Struct AudioFrame
Single raw uncompressed audio frame.
Namespace: Microsoft.MixedReality.WebRTC
Assembly: Microsoft.MixedReality.WebRTC.dll
Syntax
public struct AudioFrame
Remarks
The use of ref struct
is an optimization to avoid heap allocation on each frame while
having a nicer-to-use container to pass a frame accross methods.
Fields
| Improve this Doc View SourceaudioData
Buffer of audio samples for all channels.
Declaration
public IntPtr audioData
Field Value
Type | Description |
---|---|
IntPtr |
bitsPerSample
Number of bits per sample, generally 8 or 16.
Declaration
public uint bitsPerSample
Field Value
Type | Description |
---|---|
UInt32 |
channelCount
Number of audio channels.
Declaration
public uint channelCount
Field Value
Type | Description |
---|---|
UInt32 |
sampleCount
Number of consecutive samples in the audio data buffer. WebRTC generally delivers frames in 10ms chunks, so for e.g. a 16 kHz sample rate the sample count would be 1000.
Declaration
public uint sampleCount
Field Value
Type | Description |
---|---|
UInt32 |
sampleRate
Sample rate, in Hz. Generally in the range 8-48 kHz.
Declaration
public uint sampleRate
Field Value
Type | Description |
---|---|
UInt32 |