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

@ -719,7 +719,7 @@ void FBSurfaceGL::update()
p_glEnableClientState(GL_VERTEX_ARRAY); p_glEnableClientState(GL_VERTEX_ARRAY);
p_glEnableClientState(GL_TEXTURE_COORD_ARRAY); p_glEnableClientState(GL_TEXTURE_COORD_ARRAY);
p_glVertexPointer(2, GL_SHORT, 0, myVertCoord); p_glVertexPointer(2, GL_SHORT, 0, myVertCoord);
p_glTexCoordPointer(2, GL_FLOAT, 0, myTexCoord); p_glTexCoordPointer(2, GL_FLOAT, 0, myTexCoord);
p_glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); p_glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
p_glDisableClientState(GL_VERTEX_ARRAY); p_glDisableClientState(GL_VERTEX_ARRAY);
p_glDisableClientState(GL_TEXTURE_COORD_ARRAY); p_glDisableClientState(GL_TEXTURE_COORD_ARRAY);

View File

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

View File

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