REMOVED soundOffFlag remains

This commit is contained in:
spacy51 2008-08-26 20:48:25 +00:00
parent ae0394a1e4
commit 99d5c6e6df
7 changed files with 18 additions and 60 deletions

View File

@ -71,7 +71,6 @@ int soundBufferLen = sizeof soundFinalWave;
int soundDebug = 0;
u32 soundNextPosition = 0;
bool soundOffFlag = false;
bool soundPaused = true;
void interp_rate() { /* empty for now */ }
@ -569,14 +568,10 @@ void soundSetQuality(int quality)
{
if ( systemCanChangeSoundQuality() )
{
if ( !soundOffFlag )
soundShutdown();
soundShutdown();
soundQuality = quality;
soundNextPosition = 0;
if ( !soundOffFlag )
soundInit();
soundInit();
}
else
{

View File

@ -62,6 +62,5 @@ extern float soundFiltering; // 0.0 = none, 1.0 = max (only if soundInterpola
extern int soundBufferTotalLen;
extern u32 soundNextPosition;
extern bool soundPaused;
extern bool soundOffFlag;
#endif // VBA_SOUND_H

View File

@ -5270,33 +5270,6 @@ void gbEmulate(int ticksToStop)
while (gbInternalTimer<0)
gbInternalTimer+=0x100;
/*
if(soundOffFlag) {
if(synchronize && !speedup) {
synchronizeTicks -= clockTicks;
while(synchronizeTicks < 0) {
synchronizeTicks += SYNCHRONIZE_CLOCK_TICKS;
DWORD now = GetTickCount();
gbElapsedTime += (now - timeNow);
if(gbElapsedTime < 50) {
DWORD diff = 50 - gbElapsedTime;
Sleep(diff);
timeNow = GetTickCount();
elapsedTime = timeNow - now - diff;
if((int)elapsedTime < 0)
elapsedTime = 0;
} else {
timeNow = GetTickCount();
elapsedTime = 0;
}
}
}
}
*/
clockTicks = 0;
if (gbIntBreak == 1)

View File

@ -43,8 +43,6 @@ extern int soundTicks;
extern int SOUND_CLOCK_TICKS;
extern u32 soundNextPosition;
extern bool soundOffFlag;
int const ticks_to_time = 2 * GB_APU_OVERCLOCK;
static inline blip_time_t blip_time()
@ -235,14 +233,10 @@ void gbSoundSetQuality(int quality)
{
if ( systemCanChangeSoundQuality() )
{
if ( !soundOffFlag )
soundShutdown();
soundShutdown();
soundQuality = quality;
soundNextPosition = 0;
if ( !soundOffFlag )
soundInit();
soundInit();
}
else
{

View File

@ -600,8 +600,7 @@ bool MainWnd::FileRun()
else
soundReset();
} else {
if(!soundOffFlag)
soundInit();
soundInit();
theApp.soundInitialized = true;
}

View File

@ -413,20 +413,18 @@ void MainWnd::OnToolsRecordStartavirecording()
}
// add audio stream
if( !soundOffFlag ) {
ret = theApp.aviRecorder->CreateAudioStream(
2,
44100 / soundQuality,
16,
this->GetSafeHwnd()
);
if( !ret ) {
systemMessage( IDS_AVI_CANNOT_CREATE_AUDIO, "Cannot create audio stream in AVI file." );
delete theApp.aviRecorder;
theApp.aviRecorder = NULL;
theApp.aviRecording = false;
return;
}
ret = theApp.aviRecorder->CreateAudioStream(
2,
44100 / soundQuality,
16,
this->GetSafeHwnd()
);
if( !ret ) {
systemMessage( IDS_AVI_CANNOT_CREATE_AUDIO, "Cannot create audio stream in AVI file." );
delete theApp.aviRecorder;
theApp.aviRecorder = NULL;
theApp.aviRecording = false;
return;
}
}

View File

@ -1360,7 +1360,7 @@ void systemWriteDataToSoundBuffer()
}
}
if( theApp.aviRecording && theApp.aviRecorder && !soundOffFlag ) {
if( theApp.aviRecording && theApp.aviRecorder ) {
if( theApp.skipAudioFrames ) {
theApp.skipAudioFrames--;
} else {