mirror of https://github.com/stella-emu/stella.git
Fixed following bugs reported on AtariAge 'Stella 2.7 released' thread:
1) Sound not saved from 'Audio Settings' dialog when launched from the ROM launcher. 2) Sound not working in OpenGL mode in Windows when using ATI video card drivers. Seems to be related to ordering of initialization of sound vs. video (sound needs to be started first). git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1642 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
893c88fc4e
commit
f55a483f29
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: SoundSDL.cxx,v 1.45 2009-01-01 18:13:35 stephena Exp $
|
// $Id: SoundSDL.cxx,v 1.46 2009-01-19 21:19:59 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#ifdef SOUND_SUPPORT
|
#ifdef SOUND_SUPPORT
|
||||||
|
@ -283,7 +283,7 @@ void SoundSDL::setChannels(uInt32 channels)
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void SoundSDL::setFrameRate(float framerate)
|
void SoundSDL::setFrameRate(float framerate)
|
||||||
{
|
{
|
||||||
// FIXME, we should clear out the queue or adjust the values in it
|
// FIXME - should we clear out the queue or adjust the values in it?
|
||||||
myDisplayFrameRate = framerate;
|
myDisplayFrameRate = framerate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: OSystem.cxx,v 1.148 2009-01-16 16:38:06 stephena Exp $
|
// $Id: OSystem.cxx,v 1.149 2009-01-19 21:19:59 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
@ -440,6 +440,16 @@ bool OSystem::createConsole(const string& romfile, const string& md5sum)
|
||||||
#ifdef CHEATCODE_SUPPORT
|
#ifdef CHEATCODE_SUPPORT
|
||||||
myCheatManager->loadCheats(myRomMD5);
|
myCheatManager->loadCheats(myRomMD5);
|
||||||
#endif
|
#endif
|
||||||
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
// For some reason, ATI video drivers for OpenGL in Win32 cause problems
|
||||||
|
// if the sound isn't initialized before the video
|
||||||
|
// According to the SDL documentation, it shouldn't matter what order the
|
||||||
|
// systems are initialized, but apparently it *does* matter
|
||||||
|
// For now, I'll just reverse the ordering, as suggested by 'zagon' at
|
||||||
|
// http://www.atariage.com/forums/index.php?showtopic=126090&view=findpost&p=1648693
|
||||||
|
// Hopefully it won't break anything else
|
||||||
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
myConsole->initializeAudio();
|
||||||
myEventHandler->reset(EventHandler::S_EMULATE);
|
myEventHandler->reset(EventHandler::S_EMULATE);
|
||||||
if(!createFrameBuffer()) // Takes care of initializeVideo()
|
if(!createFrameBuffer()) // Takes care of initializeVideo()
|
||||||
{
|
{
|
||||||
|
@ -447,7 +457,6 @@ bool OSystem::createConsole(const string& romfile, const string& md5sum)
|
||||||
myEventHandler->reset(EventHandler::S_LAUNCHER);
|
myEventHandler->reset(EventHandler::S_LAUNCHER);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
myConsole->initializeAudio();
|
|
||||||
#ifdef DEBUGGER_SUPPORT
|
#ifdef DEBUGGER_SUPPORT
|
||||||
myDebugger->setConsole(myConsole);
|
myDebugger->setConsole(myConsole);
|
||||||
myDebugger->initialize();
|
myDebugger->initialize();
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: AudioDialog.cxx,v 1.31 2009-01-04 22:27:43 stephena Exp $
|
// $Id: AudioDialog.cxx,v 1.32 2009-01-19 21:19:59 stephena Exp $
|
||||||
//
|
//
|
||||||
// Based on code from ScummVM - Scumm Interpreter
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// Copyright (C) 2002-2004 The ScummVM project
|
||||||
|
@ -166,6 +166,7 @@ void AudioDialog::saveConfig()
|
||||||
Settings& settings = instance().settings();
|
Settings& settings = instance().settings();
|
||||||
|
|
||||||
// Volume
|
// Volume
|
||||||
|
settings.setInt("volume", myVolumeSlider->getValue());
|
||||||
instance().sound().setVolume(myVolumeSlider->getValue());
|
instance().sound().setVolume(myVolumeSlider->getValue());
|
||||||
|
|
||||||
// Fragsize
|
// Fragsize
|
||||||
|
|
Loading…
Reference in New Issue