diff options
| author | SND\shalma_cp <SND\shalma_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2011-02-05 21:57:09 +0000 |
|---|---|---|
| committer | SND\shalma_cp <SND\shalma_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2011-02-05 21:57:09 +0000 |
| commit | 4b3365fbec08dad696b81ed9604f9e59331029f4 (patch) | |
| tree | 08e6f80a263c248cf581f2a6b22be94179888cbd /plugins | |
| parent | 643014809261ae7623f9ba87cb5d18b7f96c0698 (diff) | |
| download | pcsxr-4b3365fbec08dad696b81ed9604f9e59331029f4.tar.gz | |
dfsound
-spu.c- restore $4000 max volume (main volume)
Experimental patches
- registers.c, spu.c- voice on init delay
Disabled by default
> should be last of the shalma/hopkat compat hacks
> don't want to mess up anything else anymore :)
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@62974 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/dfsound/registers.c | 5 | ||||
| -rw-r--r-- | plugins/dfsound/spu.c | 15 |
2 files changed, 17 insertions, 3 deletions
diff --git a/plugins/dfsound/registers.c b/plugins/dfsound/registers.c index 72f305ee..2e9086ed 100644 --- a/plugins/dfsound/registers.c +++ b/plugins/dfsound/registers.c @@ -434,6 +434,11 @@ void SoundOn(int start,int end,unsigned short val) // SOUND ON PSX COMAND s_chan[ch].bOn=1;
s_chan[ch].pCurr=s_chan[ch].pStart;
+#if 0
+ // ADSR init time (guess to # apu cycles)
+ s_chan[ch].ADSRX.StartDelay = 20;
+#endif
+
// Final Fantasy 7 - don't do any of these
// - sets loop address before VoiceOn
//s_chan[ch].pLoop = s_chan[ch].pStart;
diff --git a/plugins/dfsound/spu.c b/plugins/dfsound/spu.c index 3f51c5e9..e768eae1 100644 --- a/plugins/dfsound/spu.c +++ b/plugins/dfsound/spu.c @@ -597,8 +597,17 @@ static void *MAINThread(void *arg) for(ch=0;ch<MAXCHAN;ch++) // loop em all... we will collect 1 ms of sound of each playing channel { if(s_chan[ch].bNew) {
- StartSound(ch); // start new sound
+#if 1
+ StartSound(ch); // start new sound
dwNewChannel&=~(1<<ch); // clear new channel bit
+#else
+ if( s_chan[ch].ADSRX.StartDelay == 0 ) {
+ StartSound(ch); // start new sound
+ dwNewChannel&=~(1<<ch); // clear new channel bit
+ } else {
+ s_chan[ch].ADSRX.StartDelay--;
+ }
+#endif
} if(!s_chan[ch].bOn) continue; // channel not playing? next @@ -789,8 +798,8 @@ GOON: ; s_chan[ch].sval=0; // debug mute else { - SSumL[ns]+=(s_chan[ch].sval*s_chan[ch].iLeftVolume)/0x8000L; - SSumR[ns]+=(s_chan[ch].sval*s_chan[ch].iRightVolume)/0x8000L; + SSumL[ns]+=(s_chan[ch].sval*s_chan[ch].iLeftVolume)/0x4000L; + SSumR[ns]+=(s_chan[ch].sval*s_chan[ch].iRightVolume)/0x4000L; } ////////////////////////////////////////////// |
