dlib.audio.sample

Sample types and conversion utilities

Members

Enums

SampleFormat
enum SampleFormat

dlib.audio defines four integer sample formats: signed 8-bit, signed 16-bit, unsigned 8-bit, unsigned 16-bit. They are for storage only. All sound processing and sample I/O should be done in floating point numbers. Floating point sample is signed and ranges from -1.0f to 1.0f.

Functions

fromFloatSample
void fromFloatSample(ubyte* ptr, SampleFormat format, float s)

Convert floating point sample to integer sample

toFloatSample
float toFloatSample(ubyte* ptr, SampleFormat format)

Convert integer sample to floating point sample

Meta

Authors

Timur Gafarov