We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c7c7485 commit 6c520d9Copy full SHA for 6c520d9
src/codal_port/modaudio.c
@@ -124,7 +124,13 @@ static void audio_data_fetcher(mp_sched_node_t *node) {
124
125
if (audio_source_frame == NULL) {
126
// Audio source is exhausted.
127
- // Fill any remaining audio_output_buffer bytes with silence.
+
128
+ if (audio_output_buffer_offset == 0) {
129
+ // No output data left, finish output streaming.
130
+ return;
131
+ }
132
133
+ // Fill remaining audio_output_buffer bytes with silence, for the final output frame.
134
memset(dest, 128, AUDIO_OUTPUT_BUFFER_SIZE - audio_output_buffer_offset);
135
audio_output_buffer_offset = AUDIO_OUTPUT_BUFFER_SIZE;
136
} else {
0 commit comments