예제 #1
0
파일: sound.cpp 프로젝트: IcooN/OpenEmu
int32 MDSound_Flush(int16 *SoundBuf, const int32 MaxSoundFrames)
{
 int32 FrameCount = 0;

 UpdateFM();
 apu.end_frame(md_timestamp / 15);

 zebuf.end_frame(md_timestamp / 15);

 if(SoundBuf)
  FrameCount = zebuf.read_samples(SoundBuf, MaxSoundFrames * 2) / 2;
 else
  zebuf.clear();

 fm_last_timestamp = 0;

 return(FrameCount);
}
예제 #2
0
int32 SMS_SoundFlush(int16 *SoundBuf, int32 MaxSoundFrames)
{
	int32 FrameCount = 0;

	if(FMThing)
 	 UpdateFM();

        apu.end_frame(sms.timestamp);

        zebuf.end_frame(sms.timestamp);

        if(SoundBuf)
         FrameCount = zebuf.read_samples(SoundBuf, MaxSoundFrames * 2) / 2;
	else
	 zebuf.clear();

	fm_last_timestamp = 0;

        return(FrameCount);
}