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.
I heard artifacts on some songs while using RtAudio to record my PC's audio.
When recording from float formats, it seems that some values can fall out of the expected range.
Adding std::max alongside the existing std::min calls work around the issue.
Let me know if that's not correct.
I'm using macOS 12.6, I don't know if it's specific to CoreAudio.
Repro:
Install a virtual audio device to record the Mac's audio via brew install blackhole-2ch
Import and play record.raw in audacity (2ch, 48kHz, 16-bit)
The artifacts can be clearly heard after the 5 seconds
Using soundflower instead of BlackHole lead to the same issue.
Recording the virtual devices via audacity is artifact free (it uses Portaudio).
Chrome and VLC seem to correct the audio themselves, use Safari or Firefox to repro.
Hi,
I heard artifacts on some songs while using RtAudio to record my PC's audio.
When recording from float formats, it seems that some values can fall out of the expected range. Adding std::max alongside the existing std::min calls work around the issue. Let me know if that's not correct.
I'm using macOS 12.6, I don't know if it's specific to CoreAudio.
Repro:
brew install blackhole-2ch
./tests/record 2 48000 10
record.raw
in audacity (2ch, 48kHz, 16-bit)Using soundflower instead of BlackHole lead to the same issue. Recording the virtual devices via audacity is artifact free (it uses Portaudio). Chrome and VLC seem to correct the audio themselves, use Safari or Firefox to repro.
before.mp4 after-fix.mp4