1
//============================================================================
5
// SS tttttt eeee ll ll aaaa
6
// SSSS tt ee ee ll ll aa
7
// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
8
// SS SS tt ee ll ll aa aa
9
// SSSS ttt eeeee llll llll aaaaa
11
// Copyright (c) 1995-2005 by Bradford W. Mott and the Stella team
13
// See the file "license" for information on usage and redistribution of
14
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
16
// $Id: SoundNull.hxx,v 1.4 2005/09/10 16:19:20 bwmott Exp $
17
//============================================================================
19
#ifndef SOUND_NULL_HXX
20
#define SOUND_NULL_HXX
30
This class implements a Null sound object, where-by sound generation
31
is completely disabled.
33
@author Stephen Anthony
34
@version $Id: SoundNull.hxx,v 1.4 2005/09/10 16:19:20 bwmott Exp $
36
class SoundNull : public Sound
40
Create a new sound object. The init method must be invoked before
43
SoundNull(OSystem* osystem);
52
Enables/disables the sound subsystem.
54
@param enable Either true or false, to enable or disable the sound system
55
@return Whether the sound system was enabled or disabled
57
void setEnabled(bool enable) { }
60
The system cycle counter is being adjusting by the specified amount. Any
61
members using the system cycle counter should be adjusted as needed.
63
@param amount The amount the cycle counter is being adjusted by
65
void adjustCycleCounter(Int32 amount) { }
68
Sets the number of channels (mono or stereo sound).
70
@param channels The number of channels
72
void setChannels(uInt32 channels) { }
75
Sets the display framerate. Sound generation for NTSC and PAL games
76
depends on the framerate, so we need to set it here.
78
@param framerate The base framerate depending on NTSC or PAL ROM
80
void setFrameRate(uInt32 framerate) { }
83
Initializes the sound device. This must be called before any
84
calls are made to derived methods.
89
Should be called to close the sound device. Once called the sound
90
device can be started again using the initialize method.
95
Return true iff the sound device was successfully initialized.
97
@return true iff the sound device was successfully initialized.
99
bool isSuccessfullyInitialized() const { return false; }
102
Set the mute state of the sound object. While muted no sound is played.
104
@param state Mutes sound if true, unmute if false
106
void mute(bool state) { }
109
Reset the sound device.
114
Sets the sound register to a given value.
116
@param addr The register address
117
@param value The value to save into the register
118
@param cycle The system cycle at which the register is being updated
120
void set(uInt16 addr, uInt8 value, Int32 cycle) { }
123
Sets the volume of the sound device to the specified level. The
124
volume is given as a percentage from 0 to 100. Values outside
125
this range indicate that the volume shouldn't be changed at all.
127
@param percent The new volume percentage level for the sound device
129
void setVolume(Int32 percent) { }
132
Adjusts the volume of the sound device based on the given direction.
134
@param direction Increase or decrease the current volume by a predefined
135
amount based on the direction (1 = increase, -1 =decrease)
137
void adjustVolume(Int8 direction) { }
141
Loads the current state of this device from the given Deserializer.
143
@param in The deserializer device to load from.
144
@return The result of the load. True on success, false on failure.
146
bool load(Deserializer& in);
149
Saves the current state of this device to the given Serializer.
151
@param out The serializer device to save to.
152
@return The result of the save. True on success, false on failure.
154
bool save(Serializer& out);