Buffer
An audio buffer for passing data from input streams or to output streams.
Public Methods
Buffer
public Buffer(
BufferFormat format,
float [] samples
)
Parameters
Type | Name | Description |
---|---|---|
BufferFormat | format | Buffer format settings for input and output streams. |
float [] | samples |
float [] ConvertToManagedFloatSamples
Copy the provided unmanaged audio buffer to managed memory and convert the samples to float.
public static float [] ConvertToManagedFloatSamples(
uint size,
IntPtr bufferPtr,
BufferFormat format
)
Parameters
Type | Name | Description |
---|---|---|
uint | size | Number of bytes allocated for the unmanaged buffer |
IntPtr | bufferPtr | Pointer to the unmanaged buffer |
BufferFormat | format | Audio format for the unmanaged buffer |
Returns: Array of managed memory containing float samples
Public Attributes
Format
Audio buffer format.
public BufferFormat Format;
Type | Description |
---|---|
BufferFormat | Buffer format settings for input and output streams. |
NativeDataPtr
Pointer to audio data. Only valid when received on native callback threads.
public IntPtr NativeDataPtr;
Samples
Audio samples in this buffer.
public float [] Samples;
Size
Size of audio data in bytes. Only valid when received on native callback threads.
public uint Size;