snd, one more try...

This commit is contained in:
Not6
2016-02-14 13:08:49 +01:00
parent 747de44639
commit b8cb13c854
2 changed files with 7 additions and 6 deletions
+6 -5
View File
@@ -194,7 +194,7 @@ extern unsigned atari_devices[ 2 ];
#include "pokeysnd.h" #include "pokeysnd.h"
extern int UI_is_active; extern int UI_is_active;
unsigned char SBUF[1024*2]; //unsigned char SBUF[1024*2];
void retro_sound_update() void retro_sound_update()
{ {
@@ -202,23 +202,24 @@ void retro_sound_update()
if (! UI_is_active) { if (! UI_is_active) {
POKEYSND_Process(SBUF,snd_sampler_pal/**2*/); POKEYSND_Process(SNDBUF,snd_sampler_pal);
for(x=0;x<snd_sampler_pal;x++){ for(x=0;x<snd_sampler_pal;x++){
int smp = ((int) (((UBYTE *) SBUF)[x]) - 0x80) * 0x100; //int smp = ((int) (((UBYTE *) SBUF)[x]) - 0x80) * 0x100;
//int smp2 = ((int) (((UBYTE *) SBUF)[x+snd_sampler_pal]) - 0x80) * 0x100; //int smp2 = ((int) (((UBYTE *) SBUF)[x+snd_sampler_pal]) - 0x80) * 0x100;
/*
if (smp > 32767) if (smp > 32767)
smp = 32767; smp = 32767;
else if (smp < -32768) else if (smp < -32768)
smp = -32768; smp = -32768;
*/
/* /*
if (smp2 > 32767) if (smp2 > 32767)
smp2 = 32767; smp2 = 32767;
else if (smp2 < -32768) else if (smp2 < -32768)
smp2 = -32768; smp2 = -32768;
*/ */
retro_audio_cb(smp,smp/*2*/); retro_audio_cb(SNDBUF[x],SNDBUF[x]/*2*/);
} }
+1 -1
View File
@@ -61,7 +61,7 @@ int skel_main(int argc, char **argv)
printf("Failed to initialise!\n"); printf("Failed to initialise!\n");
return 3; return 3;
} }
POKEYSND_Init(POKEYSND_FREQ_17_EXACT, 44100, 2, 0); POKEYSND_Init(POKEYSND_FREQ_17_EXACT, 44100, 1, 1);
retro_sound_finalized=1; retro_sound_finalized=1;
printf("First retrun to main thread!\n"); printf("First retrun to main thread!\n");