handle NTSC/PAL

This commit is contained in:
Not6
2016-03-05 00:27:15 +01:00
parent 69531f5a99
commit 50a3b0a833
3 changed files with 75 additions and 9 deletions
+5 -4
View File
@@ -193,18 +193,19 @@ extern unsigned atari_devices[ 2 ];
#include "pokeysnd.h"
extern int UI_is_active;
extern int CURRENT_TV;
unsigned char SBUF[1024*2];
//unsigned char SBUF[1024*2];
void retro_sound_update()
{
int x;
int x,stop=CURRENT_TV==312?885:742;//FIXME: 882/735?
if (! UI_is_active) {
Sound_Callback(SNDBUF, 1024*2*2);
//POKEYSND_Process(SNDBUF,snd_sampler_pal);
for(x=0;x<snd_sampler_pal*2;x+=2){
for(x=0;x<stop*2;x+=2){
/*
int smp = ((int) (((UBYTE *) SBUF)[x]) - 0x80) * 0x100;
//int smp2 = ((int) (((UBYTE *) SBUF)[x+snd_sampler_pal]) - 0x80) * 0x100;
@@ -220,7 +221,7 @@ void retro_sound_update()
else if (smp2 < -32768)
smp2 = -32768;
*/
retro_audio_cb(SNDBUF[x],SNDBUF[x+1]);
retro_audio_cb(SNDBUF[x],SNDBUF[x+2]);
}