From: Lawrence S. <ljs...@us...> - 2020-06-06 20:07:14
|
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 600d529ada11f8b69b5ca94195368c2a00b74fa5 (commit) via 57c19fc6375711b685a2497d3428b3a2389b66fe (commit) via dd19997767feb8ff8f3543abbdb9eaa57c2020bb (commit) via dda1fe92d77c65127079194bd6f4117d9da76958 (commit) from 1dbd1da4bccb05be745599f321171c40e2ad6445 (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 600d529ada11f8b69b5ca94195368c2a00b74fa5 Merge: 1dbd1da 57c19fc Author: Lawrence Sebald <ljs...@us...> Date: Sat Jun 6 16:06:52 2020 -0400 Merge pull request #30 from andressbarajas/master Fixed sfx vol 255 crash commit 57c19fc6375711b685a2497d3428b3a2389b66fe Author: Andress Barajas <and...@gm...> Date: Sat Jun 6 12:53:08 2020 -0700 Picky stuff commit dd19997767feb8ff8f3543abbdb9eaa57c2020bb Author: Andress Barajas <and...@gm...> Date: Sat Jun 6 12:39:10 2020 -0700 Remove unused variable commit dda1fe92d77c65127079194bd6f4117d9da76958 Author: Andress Barajas <and...@gm...> Date: Sat Jun 6 01:59:04 2020 -0700 Fixed sfx vol 255 crash ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/sound/arm/aica.c | 14 +++----------- kernel/arch/dreamcast/sound/snd_stream.c | 4 ++-- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/kernel/arch/dreamcast/sound/arm/aica.c b/kernel/arch/dreamcast/sound/arm/aica.c index 2ff2ca1..411922b 100644 --- a/kernel/arch/dreamcast/sound/arm/aica.c +++ b/kernel/arch/dreamcast/sound/arm/aica.c @@ -96,7 +96,6 @@ void aica_play(int ch, int delay) { uint32 freq_lo, freq_base = 5644800; int freq_hi = 7; - uint32 i; uint32 playCont; /* Stop the channel (if it's already playing) */ @@ -124,14 +123,13 @@ void aica_play(int ch, int delay) { /* Write resulting values */ CHNREG32(ch, 24) = (freq_hi << 11) | (freq_lo & 1023); - /* Set volume, pan */ + /* Convert the incoming pan into a hardware value and set it */ CHNREG8(ch, 36) = calc_aica_pan(pan); CHNREG8(ch, 37) = 0xf; /* turn off Low Pass Filter (LPF) */ CHNREG8(ch, 40) = 0x24; - /* Convert the incoming volume and pan into hardware values */ - /* Vol starts at zero so we can ramp */ - CHNREG8(ch, 41) = 0xff; + /* Convert the incoming volume into a hardware value and set it */ + CHNREG8(ch, 41) = calc_aica_vol(vol); /* If we supported volume envelopes (which we don't yet) then this value would set that up. The top 4 bits determine the @@ -149,21 +147,15 @@ void aica_play(int ch, int delay) { also set the bits to start playback here. */ CHNREG32(ch, 4) = smpptr & 0xffff; playCont = (mode << 7) | (smpptr >> 16); - vol = calc_aica_vol(vol); if(loopflag) playCont |= 0x0200; if(delay) { CHNREG32(ch, 0) = playCont; /* key off */ - CHNREG8(ch, 41) = vol; } else { CHNREG32(ch, 0) = 0xc000 | playCont; /* key on */ - - /* ramp up the volume */ - for(i = 0xff; i >= vol; i--) - CHNREG8(ch, 41) = i; } } diff --git a/kernel/arch/dreamcast/sound/snd_stream.c b/kernel/arch/dreamcast/sound/snd_stream.c index 900c82c..6fb6b24 100644 --- a/kernel/arch/dreamcast/sound/snd_stream.c +++ b/kernel/arch/dreamcast/sound/snd_stream.c @@ -432,7 +432,7 @@ void snd_stream_stop(snd_stream_hnd_t hnd) { /* Channel 1 */ cmd->cmd_id = streams[hnd].ch[1]; - snd_sh4_to_aica(tmp, AICA_CMDSTR_CHANNEL_SIZE); + snd_sh4_to_aica(tmp, cmd->size); } /* The DMA will chain to this to start the second DMA. */ @@ -476,7 +476,7 @@ int snd_stream_poll(snd_stream_hnd_t hnd) { /* round it a little bit */ needed_samples &= ~0x7ff; - /* printf("last_write_pos %6i, current_play_pos %6i, needed_samples %6i\n",last_write_pos,current_play_pos,needed_samples); */ + /* printf("last_write_pos %6u, current_play_pos %6u, needed_samples %6i\n",streams[hnd].last_write_pos,current_play_pos,needed_samples); */ if(needed_samples > 0) { if(streams[hnd].stereo) { hooks/post-receive -- A pseudo Operating System for the Dreamcast. |