Oops, the last commit contained experimental sound changes.

git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2268 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2011-08-17 00:25:22 +00:00
parent 737e6743de
commit 738e0aa73d
3 changed files with 7 additions and 12 deletions

View File

@ -50,11 +50,7 @@ SoundSDL::SoundSDL(OSystem* osystem)
SoundSDL::~SoundSDL()
{
// Close the SDL audio system if it's initialized
if(myIsInitializedFlag)
{
SDL_CloseAudio();
myIsInitializedFlag = false;
}
close();
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -79,9 +75,8 @@ void SoundSDL::open()
myRegWriteQueue.clear();
myTIASound.reset();
if(!myIsInitializedFlag && SDL_WasInit(SDL_INIT_AUDIO) == 0)
if(SDL_WasInit(SDL_INIT_AUDIO) == 0)
{
cerr << "SoundSDL::open()\n";
myIsInitializedFlag = false;
myIsMuted = false;
myLastRegisterSetCycle = 0;
@ -163,8 +158,8 @@ void SoundSDL::close()
{
if(myIsInitializedFlag)
{
cerr << "SoundSDL::close()\n";
SDL_PauseAudio(1);
SDL_CloseAudio();
myIsInitializedFlag = false;
}
}

View File

@ -464,7 +464,7 @@ fallback:
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void OSystem::createSound()
{
if(!mySound)
delete mySound; mySound = NULL;
mySound = MediaFactory::createAudio(this);
#ifndef SOUND_SUPPORT
mySettings->setBool("sound", false);