Fabian Keller
2017-01-15 08:57:49 UTC
Hi all,
While developing an audio software based on PortAudio, I discovered a
surprising problem related to ALSA: I'm getting short pauses in the
audio playback (sounding like typical buffer underruns) depending on
the audio amplitude.
As a test, I have generated two wave files containing pure white
noise. One of them with an amplitude of 0.5 the other one using a full
range amplitude of 1.0. I'm playing both files with aplay, but I'm
getting the same behavior with other players and also with the
software I'm developing: The 0.5 amplitude files plays without any
issues. But the 1.0 amplitude file plays with short breaks in the
audio stream. I'm getting about two of these breaks per minute, but
there does not seem to be a deterministic pattern. I would guess the
pauses are <100 ms in duration, which is why I was debugging in the
direction of buffer underruns for many days until I discovered this
amplitude effect. I have xruns logging enabled, so I'm pretty sure
this is not related to that.
Do you have any idea what could be causing this?
System specs:
- Ubuntu 14.04. with the default libportaudio2 (based on the last 2014 release)
- Standard Intel onboard sound: PCH [HDA Intel PCH], device 0: ALC892
Analog [ALC892 Analog]
Another test: Amplitude 0.9 also has breaks, so it is not just the
full range amplitude.
Thanks,
Fabian
While developing an audio software based on PortAudio, I discovered a
surprising problem related to ALSA: I'm getting short pauses in the
audio playback (sounding like typical buffer underruns) depending on
the audio amplitude.
As a test, I have generated two wave files containing pure white
noise. One of them with an amplitude of 0.5 the other one using a full
range amplitude of 1.0. I'm playing both files with aplay, but I'm
getting the same behavior with other players and also with the
software I'm developing: The 0.5 amplitude files plays without any
issues. But the 1.0 amplitude file plays with short breaks in the
audio stream. I'm getting about two of these breaks per minute, but
there does not seem to be a deterministic pattern. I would guess the
pauses are <100 ms in duration, which is why I was debugging in the
direction of buffer underruns for many days until I discovered this
amplitude effect. I have xruns logging enabled, so I'm pretty sure
this is not related to that.
Do you have any idea what could be causing this?
System specs:
- Ubuntu 14.04. with the default libportaudio2 (based on the last 2014 release)
- Standard Intel onboard sound: PCH [HDA Intel PCH], device 0: ALC892
Analog [ALC892 Analog]
Another test: Amplitude 0.9 also has breaks, so it is not just the
full range amplitude.
Thanks,
Fabian