diff --git a/src/86box.c b/src/86box.c index 9647a8a6e..2e49184ef 100644 --- a/src/86box.c +++ b/src/86box.c @@ -941,9 +941,7 @@ pc_reset_hard_close(void) scsi_disk_close(); -#ifdef USE_OPENAL closeal(); -#endif video_reset_close(); diff --git a/src/sound/midi_fluidsynth.c b/src/sound/midi_fluidsynth.c index ed3e2d535..14093efb4 100644 --- a/src/sound/midi_fluidsynth.c +++ b/src/sound/midi_fluidsynth.c @@ -40,10 +40,8 @@ enum fluid_interp { }; -#ifdef USE_OPENAL extern void givealbuffer_midi(void *buf, uint32_t size); extern void al_set_midi(int freq, int buf_size); -#endif static void *fluidsynth_handle; /* handle to FluidSynth DLL */ @@ -152,9 +150,7 @@ static void fluidsynth_thread(void *param) buf_pos += buf_size; if (buf_pos >= data->buf_size) { -#ifdef USE_OPENAL givealbuffer_midi(data->buffer, data->buf_size / sizeof(float)); -#endif buf_pos = 0; } } @@ -167,9 +163,7 @@ static void fluidsynth_thread(void *param) buf_pos += buf_size; if (buf_pos >= data->buf_size) { -#ifdef USE_OPENAL givealbuffer_midi(data->buffer_int16, data->buf_size / sizeof(int16_t)); -#endif buf_pos = 0; } } @@ -322,9 +316,7 @@ void* fluidsynth_init(const device_t *info) data->buffer_int16 = malloc(data->buf_size); } -#ifdef USE_OPENAL al_set_midi(data->samplerate, data->buf_size); -#endif dev = malloc(sizeof(midi_device_t)); memset(dev, 0, sizeof(midi_device_t)); diff --git a/src/sound/midi_mt32.c b/src/sound/midi_mt32.c index 00c26b392..e1812a733 100644 --- a/src/sound/midi_mt32.c +++ b/src/sound/midi_mt32.c @@ -14,10 +14,8 @@ #include <86box/midi.h> -#ifdef USE_OPENAL extern void givealbuffer_midi(void *buf, uint32_t size); extern void al_set_midi(int freq, int buf_size); -#endif static void display_mt32_message(void *instance_data, const char *message); @@ -193,9 +191,7 @@ static void mt32_thread(void *param) buf_pos += bsize; if (buf_pos >= buf_size) { -#ifdef USE_OPENAL givealbuffer_midi(buffer, buf_size / sizeof(float)); -#endif buf_pos = 0; } } @@ -207,9 +203,7 @@ static void mt32_thread(void *param) buf_pos += bsize; if (buf_pos >= buf_size) { -#ifdef USE_OPENAL givealbuffer_midi(buffer_int16, buf_size / sizeof(int16_t)); -#endif buf_pos = 0; } } @@ -261,9 +255,7 @@ void* mt32emu_init(char *control_rom, char *pcm_rom) mt32emu_set_reversed_stereo_enabled(context, device_get_config_int("reversed_stereo")); mt32emu_set_nice_amp_ramp_enabled(context, device_get_config_int("nice_ramp")); -#ifdef USE_OPENAL al_set_midi(samplerate, buf_size); -#endif dev = malloc(sizeof(midi_device_t)); memset(dev, 0, sizeof(midi_device_t)); diff --git a/src/sound/sound.c b/src/sound/sound.c index e12b38bcb..4beab94ba 100644 --- a/src/sound/sound.c +++ b/src/sound/sound.c @@ -347,12 +347,10 @@ sound_cd_thread(void *param) } } -#ifdef USE_OPENAL if (sound_is_float) givealbuffer_cd(cd_out_buffer); else givealbuffer_cd(cd_out_buffer_int16); -#endif } } @@ -465,12 +463,10 @@ sound_poll(void *priv) } } -#ifdef USE_OPENAL if (sound_is_float) givealbuffer(outbuffer_ex); else givealbuffer(outbuffer_ex_int16); -#endif if (cd_thread_enable) { cd_buf_update--; @@ -499,9 +495,8 @@ sound_reset(void) midi_device_init(); midi_in_device_init(); -#ifdef USE_OPENAL + inital(); -#endif timer_add(&sound_poll_timer, sound_poll, NULL, 1);