snd try again!

This commit is contained in:
Not6
2016-02-15 20:36:16 +01:00
parent b8cb13c854
commit eefd1e154e
3 changed files with 13 additions and 11 deletions
+7 -6
View File
@@ -194,7 +194,7 @@ extern unsigned atari_devices[ 2 ];
#include "pokeysnd.h"
extern int UI_is_active;
//unsigned char SBUF[1024*2];
unsigned char SBUF[1024*2];
void retro_sound_update()
{
@@ -202,24 +202,25 @@ void retro_sound_update()
if (! UI_is_active) {
POKEYSND_Process(SNDBUF,snd_sampler_pal);
Sound_Callback(SBUF, 1024);
//POKEYSND_Process(SNDBUF,snd_sampler_pal);
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;
/*
if (smp > 32767)
smp = 32767;
else if (smp < -32768)
smp = -32768;
*/
/*
if (smp2 > 32767)
smp2 = 32767;
else if (smp2 < -32768)
smp2 = -32768;
*/
retro_audio_cb(SNDBUF[x],SNDBUF[x]/*2*/);
retro_audio_cb(smp,smp);
}