Refactor : remove unused ivars

This commit is contained in:
Aaron Culliney 2015-06-15 21:55:30 -07:00
parent d6b5c19584
commit aedada03e9
4 changed files with 0 additions and 20 deletions

View File

@ -2215,13 +2215,6 @@ bool MB_IsActive()
//-----------------------------------------------------------------------------
unsigned long MB_GetVolume()
{
return MockingboardVoice.dwUserVolume;
}
//-----------------------------------------------------------------------------
static long NewVolume(unsigned long dwVolume, unsigned long dwVolumeMax)
{
float fVol = (float) dwVolume / (float) dwVolumeMax; // 0.0=Max, 1.0=Min
@ -2236,7 +2229,6 @@ void MB_SetVolume(unsigned long dwVolume, unsigned long dwVolumeMax)
dwVolume >>= 2;
dwVolumeMax >>= 2;
#endif
MockingboardVoice.dwUserVolume = dwVolume;
MockingboardVoice.nVolume = NewVolume(dwVolume, dwVolumeMax);

View File

@ -45,8 +45,6 @@ static SoundSystem_s *g_lpDS = NULL;
static unsigned int g_uNumVoices = 0;
static VOICE* g_pVoices[uMAX_VOICES] = {NULL};
static VOICE* g_pSpeakerVoice = NULL;
//-------------------------------------
bool audio_isAvailable = false;
@ -117,16 +115,11 @@ int DSGetSoundBuffer(VOICE* pVoice, unsigned long dwFlags, unsigned long dwBuffe
if(g_uNumVoices < uMAX_VOICES)
g_pVoices[g_uNumVoices++] = pVoice;
if(pVoice->bIsSpeaker)
g_pSpeakerVoice = pVoice;
return hr;
}
void DSReleaseSoundBuffer(VOICE* pVoice)
{
if(pVoice->bIsSpeaker)
g_pSpeakerVoice = NULL;
for(unsigned int i=0; i<g_uNumVoices; i++)
{

View File

@ -73,10 +73,6 @@ typedef struct
bool bActive; // Playback is active
bool bMute;
long nVolume; // Current volume (as used by DirectSound)
long nFadeVolume; // Current fade volume (as used by DirectSound)
unsigned long dwUserVolume; // Volume from slider on Property Sheet (0=Max)
bool bIsSpeaker;
bool bRecentlyActive; // (Speaker only) false after 0.2s of speaker inactivity
} VOICE, *PVOICE;

View File

@ -322,7 +322,6 @@ void speaker_destroy(void) {
}
void speaker_init(void) {
SpeakerVoice.bIsSpeaker = true;
SpeakerVoice.bActive = true;
long err = DSGetSoundBuffer(&SpeakerVoice, 0, SOUNDCORE_BUFFER_SIZE, SPKR_SAMPLE_RATE, 1);
assert(!err);