Remove some vestiges from sound code.

This commit is contained in:
Brandon Wright 2017-11-30 18:14:17 -06:00
parent 32e87fab07
commit 12d73bbf25
14 changed files with 2 additions and 68 deletions

View File

@ -386,8 +386,6 @@ S9xIdleFunc (gpointer data)
S9xMainLoop ();
S9xMixSound ();
#ifdef NETPLAY_SUPPORT
S9xNetplayPop ();
}

View File

@ -21,16 +21,11 @@
#include "gtk_sound_driver_pulse.h"
#endif
int playback_rates[8] =
static int playback_rates[8] =
{
0, 8000, 11025, 16000, 22050, 32000, 44100, 48000
};
double d_playback_rates[8] =
{
0.0, 8000.0, 11025.0, 16000.0, 22050.0, 32000.0, 44100.0, 48000.0
};
S9xSoundDriver *driver;
int
@ -187,24 +182,13 @@ S9xSoundStop (void)
return;
}
void
S9xMixSound (void)
{
driver->mix ();
return;
}
bool8
S9xOpenSoundDevice (void)
{
if (gui_config->mute_sound)
return FALSE;
if (gui_config->sound_buffer_size < 2)
gui_config->sound_buffer_size = 2;
if (gui_config->sound_buffer_size > 256)
gui_config->sound_buffer_size = 256;
gui_config->sound_buffer_size = CLAMP (gui_config->sound_buffer_size, 2, 256);
return driver->open_device ();
}

View File

@ -6,13 +6,8 @@ void S9xPortSoundDeinit (void);
void S9xPortSoundReinit (void);
void S9xSoundStart (void);
void S9xSoundStop (void);
void S9xMixSound (void);
int S9xSoundBase2log (int num);
int S9xSoundPowerof2 (int num);
extern int playback_rates[8];
extern int buffer_sizes[8];
extern double d_playback_rates[8];
#endif /* __GTK_SOUND_H */

View File

@ -12,7 +12,6 @@ class S9xSoundDriver
virtual bool8 open_device (void) = 0;
virtual void start (void) = 0;
virtual void stop (void) = 0;
virtual void mix (void) = 0;
};

View File

@ -134,12 +134,6 @@ fail:
return FALSE;
}
void
S9xAlsaSoundDriver::mix (void)
{
return;
}
void
S9xAlsaSoundDriver::samples_available (void)
{

View File

@ -14,7 +14,6 @@ class S9xAlsaSoundDriver : public S9xSoundDriver
bool8 open_device (void);
void start (void);
void stop (void);
void mix (void);
void samples_available (void);
private:

View File

@ -167,12 +167,6 @@ fail:
return FALSE;
}
void
S9xOSSSoundDriver::mix (void)
{
return;
}
void
S9xOSSSoundDriver::samples_available (void)
{

View File

@ -13,7 +13,6 @@ class S9xOSSSoundDriver : public S9xSoundDriver
bool8 open_device (void);
void start (void);
void stop (void);
void mix (void);
void samples_available (void);
private:

View File

@ -15,12 +15,6 @@ port_audio_samples_available_callback (void *data)
return;
}
void
S9xPortAudioSoundDriver::mix (unsigned char *output, int bytes)
{
return;
}
S9xPortAudioSoundDriver::S9xPortAudioSoundDriver(void)
{
audio_stream = NULL;
@ -235,9 +229,3 @@ S9xPortAudioSoundDriver::samples_available (void)
return;
}
void
S9xPortAudioSoundDriver::mix (void)
{
return;
}

View File

@ -16,8 +16,6 @@ class S9xPortAudioSoundDriver : public S9xSoundDriver
bool8 open_device (void);
void start (void);
void stop (void);
void mix (void);
void mix (unsigned char *output, int bytes);
void samples_available (void);
private:

View File

@ -227,12 +227,6 @@ error0:
return FALSE;
}
void
S9xPulseSoundDriver::mix (void)
{
return;
}
void
S9xPulseSoundDriver::samples_available (void)
{

View File

@ -14,7 +14,6 @@ class S9xPulseSoundDriver : public S9xSoundDriver
bool8 open_device (void);
void start (void);
void stop (void);
void mix (void);
void samples_available (void);
void lock (void);
void unlock (void);

View File

@ -120,9 +120,3 @@ S9xSDLSoundDriver::open_device (void)
return TRUE;
}
void
S9xSDLSoundDriver::mix (void)
{
return;
}

View File

@ -15,7 +15,6 @@ class S9xSDLSoundDriver : public S9xSoundDriver
bool8 open_device (void);
void start (void);
void stop (void);
void mix (void);
void mix (unsigned char *output, int bytes);
private: