win32 stuff, SIMPLE_WRITE_SOUND

git-svn-id: file:///home/notaz/opt/svn/PicoDrive@341 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
notaz 2008-01-29 23:04:26 +00:00
parent 7c9e6899a2
commit 03a265e5eb
14 changed files with 161 additions and 57 deletions

View file

@ -255,6 +255,11 @@ static int CheckIdle(void)
// to be called on 224 or line_sample scanlines only
static __inline void getSamples(int y)
{
#if SIMPLE_WRITE_SOUND
PsndRender(0, PsndLen);
if (PicoWriteSound) PicoWriteSound(PsndLen);
PsndClear();
#else
static int curr_pos = 0;
if(y == 224) {
@ -271,6 +276,7 @@ static __inline void getSamples(int y)
emustatus&=~1;
curr_pos = PsndRender(0, PsndLen/2);
}
#endif
}

View file

@ -232,6 +232,7 @@ PICO_INTERNAL int PsndRender(int offset, int length)
int do_pcm = (PicoMCD&1) && (PicoOpt&0x400) && (Pico_mcd->pcm.control & 0x80) && Pico_mcd->pcm.enabled;
offset <<= stereo;
#if !SIMPLE_WRITE_SOUND
if (offset == 0) { // should happen once per frame
// compensate for float part of PsndLen
PsndLen_exc_cnt += PsndLen_exc_add;
@ -240,6 +241,7 @@ PICO_INTERNAL int PsndRender(int offset, int length)
length++;
}
}
#endif
// PSG
if (PicoOpt & 2)