#if !(UNITY_QNX) // Disable under unsupported platforms. //------------------------------------------------------------------------------ // // // This file was automatically generated by SWIG (https://www.swig.org). // Version 4.4.0 // // Do not make changes to this file unless you know what you are doing - modify // the SWIG interface file instead. //------------------------------------------------------------------------------ /// Defines the parameters of an audio buffer format. public class AkAudioFormat : global::System.IDisposable { private global::System.IntPtr swigCPtr; protected bool swigCMemOwn; internal AkAudioFormat(global::System.IntPtr cPtr, bool cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } internal static global::System.IntPtr getCPtr(AkAudioFormat obj) { return (obj == null) ? global::System.IntPtr.Zero : obj.swigCPtr; } internal virtual void setCPtr(global::System.IntPtr cPtr) { Dispose(); swigCPtr = cPtr; } ~AkAudioFormat() { Dispose(false); } public void Dispose() { Dispose(true); global::System.GC.SuppressFinalize(this); } protected virtual void Dispose(bool disposing) { lock(this) { if (swigCPtr != global::System.IntPtr.Zero) { if (swigCMemOwn) { swigCMemOwn = false; AkUnitySoundEnginePINVOKE.CSharp_delete_AkAudioFormat(swigCPtr); } swigCPtr = global::System.IntPtr.Zero; } global::System.GC.SuppressFinalize(this); } } /// Number of samples per second public uint uSampleRate { set { AkUnitySoundEnginePINVOKE.CSharp_AkAudioFormat_uSampleRate_set(swigCPtr, value); } get { return AkUnitySoundEnginePINVOKE.CSharp_AkAudioFormat_uSampleRate_get(swigCPtr); } } /// Channel configuration. public AkChannelConfig channelConfig { set { AkUnitySoundEnginePINVOKE.CSharp_AkAudioFormat_channelConfig_set(swigCPtr, AkChannelConfig.getCPtr(value)); } get { global::System.IntPtr cPtr = AkUnitySoundEnginePINVOKE.CSharp_AkAudioFormat_channelConfig_get(swigCPtr); AkChannelConfig ret = (cPtr == global::System.IntPtr.Zero) ? null : new AkChannelConfig(cPtr, false); return ret; } } /// Number of bits per sample. public uint uBitsPerSample { set { AkUnitySoundEnginePINVOKE.CSharp_AkAudioFormat_uBitsPerSample_set(swigCPtr, value); } get { return AkUnitySoundEnginePINVOKE.CSharp_AkAudioFormat_uBitsPerSample_get(swigCPtr); } } /// Number of bytes per sample frame. (For example a 5.1 PCM 16bit should have a uBlockAlign equal to 6(5.1 channels)*2(16 bits per sample) = 12. public uint uBlockAlign { set { AkUnitySoundEnginePINVOKE.CSharp_AkAudioFormat_uBlockAlign_set(swigCPtr, value); } get { return AkUnitySoundEnginePINVOKE.CSharp_AkAudioFormat_uBlockAlign_get(swigCPtr); } } /// Data type ID (AkDataTypeID). public uint uTypeID { set { AkUnitySoundEnginePINVOKE.CSharp_AkAudioFormat_uTypeID_set(swigCPtr, value); } get { return AkUnitySoundEnginePINVOKE.CSharp_AkAudioFormat_uTypeID_get(swigCPtr); } } /// Interleave ID (AkDataInterleaveID). public uint uInterleaveID { set { AkUnitySoundEnginePINVOKE.CSharp_AkAudioFormat_uInterleaveID_set(swigCPtr, value); } get { return AkUnitySoundEnginePINVOKE.CSharp_AkAudioFormat_uInterleaveID_get(swigCPtr); } } /// Get the number of channels. /// The number of channels public uint GetNumChannels() { return AkUnitySoundEnginePINVOKE.CSharp_AkAudioFormat_GetNumChannels(swigCPtr); } /// Get the number of bits per sample. /// The number of bits per sample public uint GetBitsPerSample() { return AkUnitySoundEnginePINVOKE.CSharp_AkAudioFormat_GetBitsPerSample(swigCPtr); } /// Get the block alignment. /// The block alignment public uint GetBlockAlign() { return AkUnitySoundEnginePINVOKE.CSharp_AkAudioFormat_GetBlockAlign(swigCPtr); } /// Get the data sample format (Float or Integer). /// The data sample format public uint GetTypeID() { return AkUnitySoundEnginePINVOKE.CSharp_AkAudioFormat_GetTypeID(swigCPtr); } /// Get the interleaved type. /// The interleaved type public uint GetInterleaveID() { return AkUnitySoundEnginePINVOKE.CSharp_AkAudioFormat_GetInterleaveID(swigCPtr); } /// Set all parameters of the audio format structure. /// Channels are specified by channel mask (standard configs). /// Number of samples per second /// Channel configuration /// Number of bits per sample /// Number of bytes per sample frame. (For example a 5.1 PCM 16bit should have a uBlockAlign equal to 6(5.1 channels)*2(16 bits per sample) = 12. /// Data sample format (Float or Integer) /// Interleaved type public void SetAll(uint in_uSampleRate, AkChannelConfig in_channelConfig, uint in_uBitsPerSample, uint in_uBlockAlign, uint in_uTypeID, uint in_uInterleaveID) { AkUnitySoundEnginePINVOKE.CSharp_AkAudioFormat_SetAll(swigCPtr, in_uSampleRate, AkChannelConfig.getCPtr(in_channelConfig), in_uBitsPerSample, in_uBlockAlign, in_uTypeID, in_uInterleaveID); } public AkAudioFormat() : this(AkUnitySoundEnginePINVOKE.CSharp_new_AkAudioFormat(), true) { } } #endif // #if !(UNITY_QNX) // Disable under unsupported platforms.