use the old logic for sample playback
this branch is meant to remain compatible with 0.9.9 release, and the goal is making movies sync with and without the patch, provided the movie format is converted accordingly (which is easy). since new sample replay logic introduced in master breaks sync with 0.9.9, it's a good idea to leave the new logic for a potential new release while remaining sync-compatible in this branch.
This commit is contained in:
parent
3695f5b329
commit
40bf609a2c
|
@ -394,27 +394,12 @@ u8 Mic_ReadSample()
|
|||
{
|
||||
if(micSamples.size() > 0)
|
||||
{
|
||||
//why is this reading every sample twice? I did this for some reason in 57dbe9128d0f8cbb4bd79154fb9cda3ab6fab386
|
||||
//maybe the game reads two samples in succession to check them or something. stuff definitely works better with the two-in-a-row
|
||||
if (micReadSamplePos == micSamples[MicSampleSelection].size()*2)
|
||||
tmp = micSamples[MicSampleSelection][micReadSamplePos >> 1];
|
||||
micReadSamplePos++;
|
||||
if(micReadSamplePos == micSamples[MicSampleSelection].size()*2)
|
||||
{
|
||||
tmp = 0x80; //silence, with 8 bit signed values
|
||||
}
|
||||
else
|
||||
{
|
||||
tmp = micSamples[MicSampleSelection][micReadSamplePos >> 1];
|
||||
|
||||
//nintendogs seems sensitive to clipped samples, at least.
|
||||
//by clamping these, we get better sounds on playback
|
||||
//I don't know how important it is, but I like nintendogs to sound good at least..
|
||||
if(tmp == 0) tmp = 1;
|
||||
if(tmp == 255) tmp = 254;
|
||||
|
||||
micReadSamplePos++;
|
||||
if(micReadSamplePos == micSamples[MicSampleSelection].size()*2)
|
||||
{
|
||||
printf("Ended mic sample MicSampleSelection\n");
|
||||
}
|
||||
micReadSamplePos=0;
|
||||
printf("Ended mic sample MicSampleSelection\n");
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue