REMOVED soundOffFlag remains

git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@639 a31d4220-a93d-0410-bf67-fe4944624d44
This commit is contained in:
spacy51 2008-08-26 20:48:25 +00:00
parent f79ceb31a6
commit 2a1538fa0d
7 changed files with 18 additions and 60 deletions

View File

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

View File

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

View File

@ -5270,33 +5270,6 @@ void gbEmulate(int ticksToStop)
while (gbInternalTimer<0) while (gbInternalTimer<0)
gbInternalTimer+=0x100; 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; clockTicks = 0;
if (gbIntBreak == 1) if (gbIntBreak == 1)

View File

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

View File

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

View File

@ -413,7 +413,6 @@ void MainWnd::OnToolsRecordStartavirecording()
} }
// add audio stream // add audio stream
if( !soundOffFlag ) {
ret = theApp.aviRecorder->CreateAudioStream( ret = theApp.aviRecorder->CreateAudioStream(
2, 2,
44100 / soundQuality, 44100 / soundQuality,
@ -428,7 +427,6 @@ void MainWnd::OnToolsRecordStartavirecording()
return; return;
} }
} }
}
void MainWnd::OnUpdateToolsRecordStartavirecording(CCmdUI* pCmdUI) void MainWnd::OnUpdateToolsRecordStartavirecording(CCmdUI* pCmdUI)

View File

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