Skip to content

Commit 5f6cc32

Browse files
DC-SWATQuzarDC
authored andcommitted
aica: Fix snd_stream_shutdown().
Also a bit improved init.
1 parent f1511f8 commit 5f6cc32

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

kernel/arch/dreamcast/sound/snd_stream.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ int snd_stream_init_ex(int channels, size_t buffer_size) {
331331
max_channels, channels);
332332
return -1;
333333
}
334-
else if(buffer_size > max_buffer_size) {
334+
else if(max_buffer_size && buffer_size > max_buffer_size) {
335335
dbglog(DBG_ERROR, "snd_stream_init_ex(): already initialized"
336336
" with %d buffer size, but %d requested\n",
337337
max_buffer_size, buffer_size);
@@ -481,6 +481,9 @@ void snd_stream_shutdown(void) {
481481
sep_buffer[0] = NULL;
482482
sep_buffer[1] = NULL;
483483
}
484+
485+
max_channels = 0;
486+
max_buffer_size = 0;
484487
}
485488

486489
/* Enable / disable stream queueing */

0 commit comments

Comments
 (0)