mirror of
https://github.com/Pecusx/libretro-atari800.git
synced 2026-05-21 14:49:36 +02:00
snd, one more try...
This commit is contained in:
@@ -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
@@ -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");
|
||||||
|
|||||||
Reference in New Issue
Block a user