mirror of
https://github.com/Pecusx/libretro-atari800.git
synced 2026-05-20 22:33:22 +02:00
snd 3th try
This commit is contained in:
+25
-4
@@ -194,14 +194,35 @@ extern unsigned atari_devices[ 2 ];
|
||||
#include "pokeysnd.h"
|
||||
extern int UI_is_active;
|
||||
|
||||
unsigned char SBUF[1024*2];
|
||||
|
||||
void retro_sound_update()
|
||||
{
|
||||
int x;//silent=POKEYSND_enable_new_pokey?24449:32768;
|
||||
int x;
|
||||
|
||||
if (! UI_is_active) {
|
||||
POKEYSND_Process(SNDBUF,snd_sampler_pal*4);
|
||||
for(x=0;x<snd_sampler_pal;x++)
|
||||
retro_audio_cb(SNDBUF[x]/*<<8*/,SNDBUF[snd_sampler_pal+x]/*<<8*/);
|
||||
|
||||
POKEYSND_Process(SBUF,snd_sampler_pal/**2*/);
|
||||
for(x=0;x<snd_sampler_pal;x++){
|
||||
|
||||
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(smp,smp/*2*/);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user