mirror of
https://github.com/Pecusx/libretro-atari800.git
synced 2026-05-21 06:39:36 +02:00
snd try again!
This commit is contained in:
+1
-1
@@ -490,7 +490,7 @@
|
|||||||
/* #undef SUPPORTS_SOUND_REINIT */
|
/* #undef SUPPORTS_SOUND_REINIT */
|
||||||
|
|
||||||
/* Define to use synchronized sound. */
|
/* Define to use synchronized sound. */
|
||||||
/* #undef SYNCHRONIZED_SOUND */
|
#define SYNCHRONIZED_SOUND 1
|
||||||
|
|
||||||
/* Alternate system-wide config file for non-Unix OS. */
|
/* Alternate system-wide config file for non-Unix OS. */
|
||||||
/* #undef SYSTEM_WIDE_CFG_FILE */
|
/* #undef SYSTEM_WIDE_CFG_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,24 +202,25 @@ void retro_sound_update()
|
|||||||
|
|
||||||
if (! UI_is_active) {
|
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++){
|
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(SNDBUF[x],SNDBUF[x]/*2*/);
|
retro_audio_cb(smp,smp);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-4
@@ -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, 1, 1);
|
//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");
|
||||||
@@ -294,9 +294,10 @@ int PLATFORM_SoundSetup(Sound_setup_t *setup)
|
|||||||
{
|
{
|
||||||
//force 16 bit stereo sound at 44100
|
//force 16 bit stereo sound at 44100
|
||||||
setup->freq=44100;
|
setup->freq=44100;
|
||||||
setup->sample_size=2;
|
setup->sample_size=1;
|
||||||
setup->channels=2;
|
setup->channels=1;
|
||||||
setup->buffer_ms=20;
|
// setup->buffer_ms=20;
|
||||||
|
setup->buffer_frames = 1024;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user