class MAGES::Recorder::PCM¶
Overview¶
PCM format. More…
class PCM
{
public:
// enums
enum Format;
// methods
static int BitsPerSample(Format format);
static uint BytesPerSample(Format format);
static float[] CvFormatToNF32(
System.Array data,
int channels,
Format inputFormat
);
static System.Array CvNF32ToFormat(
float[] data,
int channels,
Format targetFormat
);
};
Detailed Documentation¶
PCM format.
Methods¶
static int BitsPerSample(Format format)
Gets the number of bits per sample.
Parameters:
format |
The format. |
Returns:
The number of bits per sample.
static uint BytesPerSample(Format format)
Gets the number of bytes per sample.
Parameters:
format |
The format. |
Returns:
The number of bytes per sample.
static float[] CvFormatToNF32(
System.Array data,
int channels,
Format inputFormat
)
Converts samples to f32 [-1,1] format.
Parameters:
data |
The samples to convert. |
channels |
The number of channels. |
inputFormat |
The input format. |
Returns:
The converted samples.
static System.Array CvNF32ToFormat(
float[] data,
int channels,
Format targetFormat
)
Converts f32 [-1,1] samples to the target format.
Parameters:
data |
The samples to convert. |
channels |
The number of channels. |
targetFormat |
The target format. |
Returns:
The converted samples.