Remove the USE_OPENAL define as the reason for its introduction is gone

This commit is contained in:
David Hrdlička
2022-02-20 00:46:24 +01:00
parent 3101d74658
commit 6a63ae21f8
4 changed files with 1 additions and 24 deletions

View File

@@ -941,9 +941,7 @@ pc_reset_hard_close(void)
scsi_disk_close(); scsi_disk_close();
#ifdef USE_OPENAL
closeal(); closeal();
#endif
video_reset_close(); video_reset_close();

View File

@@ -40,10 +40,8 @@ enum fluid_interp {
}; };
#ifdef USE_OPENAL
extern void givealbuffer_midi(void *buf, uint32_t size); extern void givealbuffer_midi(void *buf, uint32_t size);
extern void al_set_midi(int freq, int buf_size); extern void al_set_midi(int freq, int buf_size);
#endif
static void *fluidsynth_handle; /* handle to FluidSynth DLL */ static void *fluidsynth_handle; /* handle to FluidSynth DLL */
@@ -152,9 +150,7 @@ static void fluidsynth_thread(void *param)
buf_pos += buf_size; buf_pos += buf_size;
if (buf_pos >= data->buf_size) if (buf_pos >= data->buf_size)
{ {
#ifdef USE_OPENAL
givealbuffer_midi(data->buffer, data->buf_size / sizeof(float)); givealbuffer_midi(data->buffer, data->buf_size / sizeof(float));
#endif
buf_pos = 0; buf_pos = 0;
} }
} }
@@ -167,9 +163,7 @@ static void fluidsynth_thread(void *param)
buf_pos += buf_size; buf_pos += buf_size;
if (buf_pos >= data->buf_size) if (buf_pos >= data->buf_size)
{ {
#ifdef USE_OPENAL
givealbuffer_midi(data->buffer_int16, data->buf_size / sizeof(int16_t)); givealbuffer_midi(data->buffer_int16, data->buf_size / sizeof(int16_t));
#endif
buf_pos = 0; buf_pos = 0;
} }
} }
@@ -322,9 +316,7 @@ void* fluidsynth_init(const device_t *info)
data->buffer_int16 = malloc(data->buf_size); data->buffer_int16 = malloc(data->buf_size);
} }
#ifdef USE_OPENAL
al_set_midi(data->samplerate, data->buf_size); al_set_midi(data->samplerate, data->buf_size);
#endif
dev = malloc(sizeof(midi_device_t)); dev = malloc(sizeof(midi_device_t));
memset(dev, 0, sizeof(midi_device_t)); memset(dev, 0, sizeof(midi_device_t));

View File

@@ -14,10 +14,8 @@
#include <86box/midi.h> #include <86box/midi.h>
#ifdef USE_OPENAL
extern void givealbuffer_midi(void *buf, uint32_t size); extern void givealbuffer_midi(void *buf, uint32_t size);
extern void al_set_midi(int freq, int buf_size); extern void al_set_midi(int freq, int buf_size);
#endif
static void display_mt32_message(void *instance_data, const char *message); static void display_mt32_message(void *instance_data, const char *message);
@@ -193,9 +191,7 @@ static void mt32_thread(void *param)
buf_pos += bsize; buf_pos += bsize;
if (buf_pos >= buf_size) if (buf_pos >= buf_size)
{ {
#ifdef USE_OPENAL
givealbuffer_midi(buffer, buf_size / sizeof(float)); givealbuffer_midi(buffer, buf_size / sizeof(float));
#endif
buf_pos = 0; buf_pos = 0;
} }
} }
@@ -207,9 +203,7 @@ static void mt32_thread(void *param)
buf_pos += bsize; buf_pos += bsize;
if (buf_pos >= buf_size) if (buf_pos >= buf_size)
{ {
#ifdef USE_OPENAL
givealbuffer_midi(buffer_int16, buf_size / sizeof(int16_t)); givealbuffer_midi(buffer_int16, buf_size / sizeof(int16_t));
#endif
buf_pos = 0; 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_reversed_stereo_enabled(context, device_get_config_int("reversed_stereo"));
mt32emu_set_nice_amp_ramp_enabled(context, device_get_config_int("nice_ramp")); mt32emu_set_nice_amp_ramp_enabled(context, device_get_config_int("nice_ramp"));
#ifdef USE_OPENAL
al_set_midi(samplerate, buf_size); al_set_midi(samplerate, buf_size);
#endif
dev = malloc(sizeof(midi_device_t)); dev = malloc(sizeof(midi_device_t));
memset(dev, 0, sizeof(midi_device_t)); memset(dev, 0, sizeof(midi_device_t));

View File

@@ -347,12 +347,10 @@ sound_cd_thread(void *param)
} }
} }
#ifdef USE_OPENAL
if (sound_is_float) if (sound_is_float)
givealbuffer_cd(cd_out_buffer); givealbuffer_cd(cd_out_buffer);
else else
givealbuffer_cd(cd_out_buffer_int16); givealbuffer_cd(cd_out_buffer_int16);
#endif
} }
} }
@@ -465,12 +463,10 @@ sound_poll(void *priv)
} }
} }
#ifdef USE_OPENAL
if (sound_is_float) if (sound_is_float)
givealbuffer(outbuffer_ex); givealbuffer(outbuffer_ex);
else else
givealbuffer(outbuffer_ex_int16); givealbuffer(outbuffer_ex_int16);
#endif
if (cd_thread_enable) { if (cd_thread_enable) {
cd_buf_update--; cd_buf_update--;
@@ -499,9 +495,8 @@ sound_reset(void)
midi_device_init(); midi_device_init();
midi_in_device_init(); midi_in_device_init();
#ifdef USE_OPENAL
inital(); inital();
#endif
timer_add(&sound_poll_timer, sound_poll, NULL, 1); timer_add(&sound_poll_timer, sound_poll, NULL, 1);