mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-21 15:56:58 +02:00
ALSA: Don't ask the client for more data when the device is closing.
This commit is contained in:
@@ -1603,6 +1603,11 @@ mal_bool32 mal_device_write__alsa(mal_device* pDevice)
|
|||||||
return MAL_FALSE;
|
return MAL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Don't bother asking the client for more audio data if we're just stopping the device anyway.
|
||||||
|
if (pDevice->alsa.breakFromMainLoop) {
|
||||||
|
return MAL_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
mal_device__read_samples_from_client(pDevice, framesAvailable * pDevice->channels, pBuffer);
|
mal_device__read_samples_from_client(pDevice, framesAvailable * pDevice->channels, pBuffer);
|
||||||
|
|
||||||
snd_pcm_sframes_t framesWritten = snd_pcm_writei(pDevice->alsa.pPCM, pDevice->alsa.pIntermediaryBuffer, framesAvailable);
|
snd_pcm_sframes_t framesWritten = snd_pcm_writei(pDevice->alsa.pPCM, pDevice->alsa.pIntermediaryBuffer, framesAvailable);
|
||||||
|
|||||||
Reference in New Issue
Block a user