Fixed the state loading code wrt sound handling. The TIA sound register

queue is now cleared when a new state is loaded.  This should eliminate
the weird sounds that sometimes happened when a new state was loaded
(sound from the previous state was still playing).

Removed the '-paddle real' option from the description in the UNIX
commandline help code.  This option hasn't been used since Stella 1.2
and has been obsoleted by the Stelladaptor support.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@273 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2004-06-20 00:52:37 +00:00
parent 2b64fd4217
commit 2d543a8af9
3 changed files with 20 additions and 21 deletions

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: SoundSDL.cxx,v 1.3 2004-06-13 17:14:24 bwmott Exp $
// $Id: SoundSDL.cxx,v 1.4 2004-06-20 00:52:37 stephena Exp $
//============================================================================
#include <cassert>
@ -30,9 +30,9 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SoundSDL::SoundSDL(uInt32 fragsize)
: myIsInitializedFlag(false),
myFragmentSizeLogBase2(0),
myIsMuted(false),
myVolume(100),
myFragmentSizeLogBase2(0)
myVolume(100)
{
if(SDL_InitSubSystem(SDL_INIT_AUDIO) < 0)
{
@ -290,7 +290,11 @@ bool SoundSDL::load(Deserializer& in)
// Only update the TIA sound registers if sound is enabled
if(myIsInitializedFlag)
{
Tia_set_registers(reg1, reg2, reg3, reg4, reg5, reg6);
myRegWriteQueue.clear();
}
}
catch(char *msg)
{

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: SoundSDL.hxx,v 1.4 2004-06-13 17:14:25 bwmott Exp $
// $Id: SoundSDL.hxx,v 1.5 2004-06-20 00:52:37 stephena Exp $
//============================================================================
#ifndef SOUNDSDL_HXX
@ -29,7 +29,7 @@
This class implements the sound API for SDL.
@author Stephen Anthony and Bradford W. Mott
@version $Id: SoundSDL.hxx,v 1.4 2004-06-13 17:14:25 bwmott Exp $
@version $Id: SoundSDL.hxx,v 1.5 2004-06-20 00:52:37 stephena Exp $
*/
class SoundSDL : public Sound
{
@ -188,12 +188,12 @@ class SoundSDL : public Sound
// Audio specification structure
SDL_AudioSpec myHardwareSpec;
// Log base 2 of the selected fragment size
double myFragmentSizeLogBase2;
// Indicates if the sound device was successfully initialized
bool myIsInitializedFlag;
// Log base 2 of the selected fragment size
double myFragmentSizeLogBase2;
// Indicates if the sound is currently muted
bool myIsMuted;

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: SettingsUNIX.cxx,v 1.3 2004-06-13 16:51:15 stephena Exp $
// $Id: SettingsUNIX.cxx,v 1.4 2004-06-20 00:52:37 stephena Exp $
//============================================================================
#include <cstdlib>
@ -90,12 +90,7 @@ void SettingsUNIX::usage(string& message)
<< " -grabmouse <0|1> Keeps the mouse in the game window\n"
<< " -hidecursor <0|1> Hides the mouse cursor in the game window\n"
<< " -volume <number> Set the volume (0 - 100)\n"
#ifdef JOYSTICK_SUPPORT
<< " -paddle <0|1|2|3|real> Indicates which paddle the mouse should emulate\n"
<< " or that real Atari 2600 paddles are being used\n"
#else
<< " -paddle <0|1|2|3> Indicates which paddle the mouse should emulate\n"
#endif
<< " -altpro <props file> Use the given properties file instead of stella.pro\n"
<< " -showinfo <0|1> Shows some game info\n"
<< " -accurate <0|1> Accurate game timing (uses more CPU)\n"
@ -107,13 +102,13 @@ void SettingsUNIX::usage(string& message)
<< endl
#ifdef DEVELOPER_SUPPORT
<< " DEVELOPER options (see Stella manual for details)\n"
<< " -Dformat Sets \"Display.Format\"\n"
<< " -Dxstart Sets \"Display.XStart\"\n"
<< " -Dwidth Sets \"Display.Width\"\n"
<< " -Dystart Sets \"Display.YStart\"\n"
<< " -Dheight Sets \"Display.Height\"\n"
<< " -mergeprops <0|1> Merge changed properties into properties file,\n"
<< " or save into a separate file\n"
<< " -Dformat Sets \"Display.Format\"\n"
<< " -Dxstart Sets \"Display.XStart\"\n"
<< " -Dwidth Sets \"Display.Width\"\n"
<< " -Dystart Sets \"Display.YStart\"\n"
<< " -Dheight Sets \"Display.Height\"\n"
<< " -mergeprops <0|1> Merge changed properties into properties file,\n"
<< " or save into a separate file\n"
#endif
<< endl;
}