Class AudioBufferReader
Represents a read-only data view of an AudioBuffer.
Inherited Members
Namespace: Cosmos.System.Audio.IO
Assembly: Cosmos.System2.dll
Syntax
public class AudioBufferReader : AudioBufferReadWriteBase
Constructors
| Improve this Doc View SourceAudioBufferReader(AudioBuffer)
Creates a new read-only data view for the specified audio buffer.
Declaration
public AudioBufferReader(AudioBuffer target)
Parameters
Type | Name | Description |
---|---|---|
AudioBuffer | target | The target buffer. |
Methods
| Improve this Doc View SourceReadChannelFloat(Int32, Int32)
Reads a single channel from the specified sample and returns the result as an 32-bit floating-point value.
Declaration
public float ReadChannelFloat(int index, int channel)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index of the target sample. |
System.Int32 | channel | The channel to read. |
Returns
Type | Description |
---|---|
System.Single |
ReadChannelInt16(Int32, Int32)
Reads a single channel from the specified sample and returns the result as an 16-bit signed value.
Declaration
public short ReadChannelInt16(int index, int channel)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index of the target sample. |
System.Int32 | channel | The channel to read. |
Returns
Type | Description |
---|---|
System.Int16 |
ReadChannelInt32(Int32, Int32)
Reads a single channel from the specified sample and returns the result as an 32-bit signed value.
Declaration
public int ReadChannelInt32(int index, int channel)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index of the target sample. |
System.Int32 | channel | The channel to read. |
Returns
Type | Description |
---|---|
System.Int32 |
ReadChannelInt8(Int32, Int32)
Reads a single channel from the specified sample and returns the result as an 8-bit signed value.
Declaration
public sbyte ReadChannelInt8(int index, int channel)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index of the target sample. |
System.Int32 | channel | The channel to read. |
Returns
Type | Description |
---|---|
System.SByte |
ReadChannelUInt16(Int32, Int32)
Reads a single channel from the specified sample and returns the result as an 16-bit unsigned value.
Declaration
public ushort ReadChannelUInt16(int index, int channel)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index of the target sample. |
System.Int32 | channel | The channel to read. |
Returns
Type | Description |
---|---|
System.UInt16 |
ReadChannelUInt32(Int32, Int32)
Reads a single channel from the specified sample and returns the result as an 32-bit unsigned value.
Declaration
public uint ReadChannelUInt32(int index, int channel)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index of the target sample. |
System.Int32 | channel | The channel to read. |
Returns
Type | Description |
---|---|
System.UInt32 |
ReadChannelUInt8(Int32, Int32)
Reads a single channel from the specified sample and returns the result as an 8-bit unsigned value.
Declaration
public byte ReadChannelUInt8(int index, int channel)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index of the target sample. |
System.Int32 | channel | The channel to read. |
Returns
Type | Description |
---|---|
System.Byte |