Remove startup sound artefact

Limit the number of processed frames to chunksize / 2 (#912)
The tg_mixer cannot process more franes,
So if it has to process more, uninitialized frames will be played, which causes strange sounds, e.g. at startup.

Closes #908
main continuous
soyer 4 days ago committed by GitHub
parent 1371c559ee
commit d70232dcd8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      src/minidexed.cpp

@ -1305,6 +1305,10 @@ void CMiniDexed::ProcessSound (void)
unsigned nFrames = m_nQueueSizeFrames - m_pSoundDevice->GetQueueFramesAvail (); unsigned nFrames = m_nQueueSizeFrames - m_pSoundDevice->GetQueueFramesAvail ();
if (nFrames >= m_nQueueSizeFrames/2) if (nFrames >= m_nQueueSizeFrames/2)
{ {
// only process the minimum number of frames (== chunksize / 2)
// as the tg_mixer cannot process more
nFrames = m_nQueueSizeFrames / 2;
if (m_bProfileEnabled) if (m_bProfileEnabled)
{ {
m_GetChunkTimer.Start (); m_GetChunkTimer.Start ();

Loading…
Cancel
Save