mirror of
https://github.com/mauiaaron/apple2.git
synced 2024-06-26 00:29:27 +00:00
Refactor : remove unused ivars
This commit is contained in:
parent
d6b5c19584
commit
aedada03e9
|
@ -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);
|
||||
|
||||
|
|
|
@ -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++)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user