On Linux, the ALSA audio thread in olcPGEX_Sound.h produces no meaningful audio output. All samples are silently discarded and replaced with a constant maximum value (32767), resulting in a DC signal being sent to the audio device. The symptom is complete silence or very faint intermittent artifacts, regardless of what the user synth function returns.
To fix that issue, in olcPGEX_Sound.h, replace:
nNewSample =
(short)(GetMixerOutput(c, m_fGlobalTime + fTimeStep * (float)n,
fTimeStep),
1.0) *
fMaxSample;
with:
nNewSample =
(short)(clip(GetMixerOutput(c, m_fGlobalTime + fTimeStep * (float)n,
fTimeStep),
1.0) *
fMaxSample);
On Linux, the ALSA audio thread in
olcPGEX_Sound.hproduces no meaningful audio output. All samples are silently discarded and replaced with a constant maximum value (32767), resulting in a DC signal being sent to the audio device. The symptom is complete silence or very faint intermittent artifacts, regardless of what the user synth function returns.To fix that issue, in olcPGEX_Sound.h, replace:
nNewSample =
(short)(GetMixerOutput(c, m_fGlobalTime + fTimeStep * (float)n,
fTimeStep),
1.0) *
fMaxSample;
with:
nNewSample =
(short)(clip(GetMixerOutput(c, m_fGlobalTime + fTimeStep * (float)n,
fTimeStep),
1.0) *
fMaxSample);