I just found out that for at least one person, starting audio before

video when creating a console fixes the sound not working issue in
OpenGL mode on ATI hardware in Windows.  It doesn't seem to break anything
else, so I'm going to leave it as the default, but the new commandline
argument '-audiofirst' can be used to reverse that logic, if necessary.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1652 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2009-01-21 15:32:15 +00:00
parent 9aac9c579b
commit 2480fff117
4 changed files with 18 additions and 4 deletions

View File

@ -15,7 +15,9 @@
2.7 to 2.7.1: (Jan. 26, 2009)
* Fixed issue with sound not working in OpenGL video mode in Windows with
ATI video hardware.
ATI video hardware. Related to this, added '-audiofirst' commandline
argument, which initializes audio before video when emulating a ROM
(this is what was causing the sound to not work).
* Fixed bug where volume wasn't being saved in 'Audio Settings' when
started from the ROM launcher.

View File

@ -763,6 +763,14 @@
saving a ROM state file.</td>
</tr>
<tr>
<td><pre>-audiofirst &lt;1|0&gt;</pre></td>
<td>Initialize the audio subsystem before video when emulating a
ROM. This seems to be required when using ATI video cards
in OpenGL mode in Windows. Since it doesn't hurt other
systems, the default is 1.</td>
</tr>
<tr>
<td><pre>-ssdir &lt;path&gt;</pre></td>
<td>The directory to save snapshot files to.</td>

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: OSystem.cxx,v 1.151 2009-01-21 12:03:17 stephena Exp $
// $Id: OSystem.cxx,v 1.152 2009-01-21 15:32:15 stephena Exp $
//============================================================================
#include <cassert>
@ -448,6 +448,7 @@ bool OSystem::createConsole(const string& romfile, const string& md5sum)
#ifdef CHEATCODE_SUPPORT
myCheatManager->loadCheats(myRomMD5);
#endif
bool audiofirst = mySettings->getBool("audiofirst");
//////////////////////////////////////////////////////////////////////////
// For some reason, ATI video drivers for OpenGL in Win32 cause problems
// if the sound isn't initialized before the video
@ -457,7 +458,7 @@ bool OSystem::createConsole(const string& romfile, const string& md5sum)
// http://www.atariage.com/forums/index.php?showtopic=126090&view=findpost&p=1648693
// Hopefully it won't break anything else
//////////////////////////////////////////////////////////////////////////
myConsole->initializeAudio();
if(audiofirst) myConsole->initializeAudio();
myEventHandler->reset(EventHandler::S_EMULATE);
if(!createFrameBuffer()) // Takes care of initializeVideo()
{
@ -465,6 +466,7 @@ bool OSystem::createConsole(const string& romfile, const string& md5sum)
myEventHandler->reset(EventHandler::S_LAUNCHER);
return false;
}
if(!audiofirst) myConsole->initializeAudio();
#ifdef DEBUGGER_SUPPORT
myDebugger->setConsole(myConsole);
myDebugger->initialize();

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: Settings.cxx,v 1.160 2009-01-21 12:03:17 stephena Exp $
// $Id: Settings.cxx,v 1.161 2009-01-21 15:32:15 stephena Exp $
//============================================================================
#include <cassert>
@ -106,6 +106,7 @@ Settings::Settings(OSystem* osystem)
setInternal("tiafloat", "true");
setInternal("avoxport", "");
setInternal("stats", "false");
setInternal("audiofirst", "true");
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -327,6 +328,7 @@ void Settings::usage()
<< " -sa1 <left|right> Stelladaptor 1 emulates specified joystick port\n"
<< " -sa2 <left|right> Stelladaptor 2 emulates specified joystick port\n"
<< " -autoslot <1|0> Automatically switch to next save slot when state saving\n"
<< " -audiofirst <1|0> Initial audio before video (required for some ATI video cards)\n"
<< " -ssdir <path> The directory to save snapshot files to\n"
<< " -sssingle <1|0> Generate single snapshot instead of many\n"
<< " -ss1x <1|0> Generate TIA snapshot in 1x mode (ignore scaling)\n"