From: kosmirror <kos...@us...> - 2025-08-07 06:01:36
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via 7460bf3085ea260de53c8bfd8ad3c31259c73280 (commit) from 3c4ee41109de309f7d7765c3eb1c9b48b1f0f1a5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 7460bf3085ea260de53c8bfd8ad3c31259c73280 Author: QuzarDC <qu...@co...> Date: Wed Jul 16 18:37:26 2025 -0400 Check for call to `snd_stream_poll` before `snd_stream_start` Add a check matching what was done for `snd_stream_fill` that will assert if called before starting the stream. Without this, it can trigger an otherwise mysterious divide by zero error. ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/sound/snd_stream.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/arch/dreamcast/sound/snd_stream.c b/kernel/arch/dreamcast/sound/snd_stream.c index 2b85fcfc..7f6f227a 100644 --- a/kernel/arch/dreamcast/sound/snd_stream.c +++ b/kernel/arch/dreamcast/sound/snd_stream.c @@ -802,6 +802,9 @@ int snd_stream_poll(snd_stream_hnd_t hnd) { return -1; } + /* The stream has been initted but not started, so we don't know stereo/mono. */ + assert(stream->channels != 0); + /* Get channels position */ current_play_pos = g2_read_32(SPU_RAM_UNCACHED_BASE + AICA_CHANNEL(stream->ch[0]) + hooks/post-receive -- A pseudo Operating System for the Dreamcast. |