mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-21 15:56:58 +02:00
Improve fix, handle all outputs
This commit is contained in:
committed by
David Reid
parent
8d5bf8210c
commit
82ae0138f3
+2
-2
@@ -40115,8 +40115,8 @@ static EM_BOOL ma_audio_worklet_process_callback__webaudio(int inputCount, const
|
|||||||
|
|
||||||
if (ma_device_get_state(pDevice) != ma_device_state_started) {
|
if (ma_device_get_state(pDevice) != ma_device_state_started) {
|
||||||
/* Fill the output buffer with zero to avoid a noise sound */
|
/* Fill the output buffer with zero to avoid a noise sound */
|
||||||
if (outputCount > 0) {
|
for (int i = 0; i < outputCount; i += 1) {
|
||||||
MA_ZERO_MEMORY(pOutputs[0].data, frameCount * pDevice->playback.internalChannels * sizeof(float));
|
MA_ZERO_MEMORY(pOutputs[i].data, pOutputs[i].numberOfChannels * pOutputs[i].samplesPerChannel * sizeof(float));
|
||||||
}
|
}
|
||||||
return EM_TRUE;
|
return EM_TRUE;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user