From: Lawrence S. <ljs...@us...> - 2020-06-05 00:39:12
|
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 1dbd1da4bccb05be745599f321171c40e2ad6445 (commit) via 15b3b2887cd43524fbea51591727eb6bca4d6fab (commit) from b3967a49ba45219759a9b28a884b9093a46927f4 (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 1dbd1da4bccb05be745599f321171c40e2ad6445 Merge: b3967a4 15b3b28 Author: Lawrence Sebald <ljs...@us...> Date: Thu Jun 4 20:38:48 2020 -0400 Merge pull request #29 from andressbarajas/master Cap needed_samples so req isnt greather than buffer_size commit 15b3b2887cd43524fbea51591727eb6bca4d6fab Author: Andress Barajas <and...@gm...> Date: Thu Jun 4 15:29:37 2020 -0700 Cap needed_samples so req isnt greather than buffer_size ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/sound/snd_stream.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/arch/dreamcast/sound/snd_stream.c b/kernel/arch/dreamcast/sound/snd_stream.c index 47f8073..900c82c 100644 --- a/kernel/arch/dreamcast/sound/snd_stream.c +++ b/kernel/arch/dreamcast/sound/snd_stream.c @@ -480,6 +480,7 @@ int snd_stream_poll(snd_stream_hnd_t hnd) { if(needed_samples > 0) { if(streams[hnd].stereo) { + needed_samples = (needed_samples > streams[hnd].buffer_size/4) ? streams[hnd].buffer_size/4 : needed_samples; data = streams[hnd].get_data(hnd, needed_samples * 4, &got_samples); process_filters(hnd, &data, &got_samples); @@ -491,6 +492,7 @@ int snd_stream_poll(snd_stream_hnd_t hnd) { } } else { + needed_samples = needed_samples > streams[hnd].buffer_size/2 ? streams[hnd].buffer_size/2 : needed_samples; data = streams[hnd].get_data(hnd, needed_samples * 2, &got_samples); process_filters(hnd, &data, &got_samples); hooks/post-receive -- A pseudo Operating System for the Dreamcast. |