fix sound

This commit is contained in:
aliaspider 2014-12-09 05:47:45 +01:00
parent cd185c849b
commit a859afadfd
2 changed files with 3 additions and 5 deletions

View File

@ -67,7 +67,7 @@ cpu_threaded.o: cpu_threaded.c
$(CC) -c -o $@ $< $(ASFLAGS) $(OPTIMIZE)
clean:
# rm -f main.o cpu.o memory.o video.o input.o sound.o cpu_threaded.o x86_stub.o cheats.o zip.o libretro.o
# rm -f main.o memory.o input.o sound.o cpu_threaded.o x86_stub.o cheats.o zip.o libretro.o
rm -f $(OBJS)
rm -f $(TARGET)

View File

@ -847,16 +847,14 @@ void retro_set_audio_sample_batch(retro_audio_sample_batch_t cb) { audio_batch_c
void render_audio(void)
{
static s16 stream_base[1024];
static s16 stream_base[512];
u32 _length;
s16 *source;
u32 i;
s32 current_sample;
// return;
while (((gbc_sound_buffer_index - sound_buffer_base) & BUFFER_SIZE_MASK) > 512) {
sound_copy(sound_buffer_base, 512, normal);
sound_copy(sound_buffer_base, 1024, normal);
audio_batch_cb(stream_base, 256);
sound_buffer_base += 512;
sound_buffer_base &= BUFFER_SIZE_MASK;