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:
parent
f79ceb31a6
commit
2a1538fa0d
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -600,8 +600,7 @@ bool MainWnd::FileRun()
|
|||
else
|
||||
soundReset();
|
||||
} else {
|
||||
if(!soundOffFlag)
|
||||
soundInit();
|
||||
soundInit();
|
||||
theApp.soundInitialized = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1360,7 +1360,7 @@ void systemWriteDataToSoundBuffer()
|
|||
}
|
||||
}
|
||||
|
||||
if( theApp.aviRecording && theApp.aviRecorder && !soundOffFlag ) {
|
||||
if( theApp.aviRecording && theApp.aviRecorder ) {
|
||||
if( theApp.skipAudioFrames ) {
|
||||
theApp.skipAudioFrames--;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue