Commit db759102 authored by Vladimir Serbinenko's avatar Vladimir Serbinenko
Browse files

LIBRETRO: Fix audio sample type

Doesn't really change anything, just a bit cleaner
parent 7118601a
......@@ -379,10 +379,10 @@ void retro_unload_game(void)
rom_size = 0;
}
int get_audio_sample(void)
int16_t get_audio_sample(void)
{
// Get the byte of the emulator's buffer that the next sample is in.
int x = chip8.RAM[AUDIO_BUF_ADDR + (snd_buf_pntr / 8)];
int16_t x = chip8.RAM[AUDIO_BUF_ADDR + (snd_buf_pntr / 8)];
// Get the actual sample bit.
x <<= (snd_buf_pntr % 8);
......@@ -461,7 +461,7 @@ void retro_run(void)
audio_counter_chip8 += ONE_SEC / chip8.cpu_freq;
while (audio_counter_chip8 > ONE_SEC / audio_freq_chip8) {
audio_counter_chip8 -= ONE_SEC / audio_freq_chip8;
int sample = get_audio_sample();
int16_t sample = get_audio_sample();
audio_counter_resample += ONE_SEC / audio_freq_chip8;
audio_sample(sample);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment