make sound & AVI recording independent from sound output
git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@204 a31d4220-a93d-0410-bf67-fe4944624d44
This commit is contained in:
parent
f05d2b145e
commit
6017a61525
|
@ -77,20 +77,6 @@ DirectSound::DirectSound()
|
||||||
|
|
||||||
DirectSound::~DirectSound()
|
DirectSound::~DirectSound()
|
||||||
{
|
{
|
||||||
if(theApp.aviRecorder) {
|
|
||||||
delete theApp.aviRecorder;
|
|
||||||
theApp.aviRecorder = NULL;
|
|
||||||
theApp.aviFrameNumber = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(theApp.soundRecording) {
|
|
||||||
if(theApp.soundRecorder) {
|
|
||||||
delete theApp.soundRecorder;
|
|
||||||
theApp.soundRecorder = NULL;
|
|
||||||
}
|
|
||||||
theApp.soundRecording = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(dsbNotify) {
|
if(dsbNotify) {
|
||||||
dsbNotify->Release();
|
dsbNotify->Release();
|
||||||
dsbNotify = NULL;
|
dsbNotify = NULL;
|
||||||
|
|
|
@ -391,16 +391,6 @@ VBA::~VBA()
|
||||||
movieLastJoypad = 0;
|
movieLastJoypad = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(aviRecorder) {
|
|
||||||
delete aviRecorder;
|
|
||||||
aviRecording = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(soundRecorder) {
|
|
||||||
delete soundRecorder;
|
|
||||||
soundRecorder = NULL;
|
|
||||||
}
|
|
||||||
soundRecording = false;
|
|
||||||
soundPause();
|
soundPause();
|
||||||
soundShutdown();
|
soundShutdown();
|
||||||
|
|
||||||
|
@ -1204,34 +1194,50 @@ int systemGetSensorY()
|
||||||
return theApp.sensorY;
|
return theApp.sensorY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool systemSoundInit()
|
bool systemSoundInit()
|
||||||
{
|
{
|
||||||
if(theApp.sound)
|
systemSoundShutdown();
|
||||||
delete theApp.sound;
|
|
||||||
|
switch( theApp.audioAPI )
|
||||||
switch( theApp.audioAPI )
|
{
|
||||||
{
|
case DIRECTSOUND:
|
||||||
case DIRECTSOUND:
|
theApp.sound = newDirectSound();
|
||||||
theApp.sound = newDirectSound();
|
break;
|
||||||
break;
|
|
||||||
#ifndef NO_OAL
|
#ifndef NO_OAL
|
||||||
case OPENAL_SOUND:
|
case OPENAL_SOUND:
|
||||||
theApp.sound = newOpenAL();
|
theApp.sound = newOpenAL();
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
return theApp.sound->init();
|
return theApp.sound->init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void systemSoundShutdown()
|
void systemSoundShutdown()
|
||||||
{
|
{
|
||||||
if(theApp.sound)
|
if( theApp.aviRecorder ) {
|
||||||
delete theApp.sound;
|
delete theApp.aviRecorder;
|
||||||
theApp.sound = NULL;
|
theApp.aviRecorder = NULL;
|
||||||
|
theApp.aviFrameNumber = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( theApp.soundRecording ) {
|
||||||
|
if( theApp.soundRecorder ) {
|
||||||
|
delete theApp.soundRecorder;
|
||||||
|
theApp.soundRecorder = NULL;
|
||||||
|
}
|
||||||
|
theApp.soundRecording = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( theApp.sound ) {
|
||||||
|
delete theApp.sound;
|
||||||
|
theApp.sound = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void systemSoundPause()
|
void systemSoundPause()
|
||||||
{
|
{
|
||||||
if(theApp.sound)
|
if(theApp.sound)
|
||||||
|
|
Loading…
Reference in New Issue