thestk / rtaudio

A set of C++ classes that provide a common API for realtime audio input/output across Linux (native ALSA, JACK, PulseAudio and OSS), Macintosh OS X (CoreAudio and JACK), and Windows (DirectSound, ASIO, and WASAPI) operating systems.
Other
1.49k stars 318 forks source link

Check and Fix (Clipping/Saturation) for float32/64 samples? #343

Closed hayguen closed 2 years ago

hayguen commented 2 years ago

the header simply writes

static const RtAudioFormat RTAUDIO_FLOAT32 = 0x10; // Normalized between plus/minus 1.0. static const RtAudioFormat RTAUDIO_FLOAT64 = 0x20; // Normalized between plus/minus 1.0.

is there any check or correction, if the sample values lie outside plus/minus 1.0 ? would be great, if documentation or the comments in the header file would drop a note on this.

garyscavone commented 2 years ago

No, there are no checks for values beyond plus/minus 1.0. I just added a comment in the header file.