#include <player_nes.h>
Public Member Functions | |
Player_NES (ScummEngine *scumm, Audio::Mixer *mixer) | |
void | setMusicVolume (int vol) override |
void | startSound (int sound) override |
void | stopSound (int sound) override |
void | stopAllSounds () override |
int | getSoundStatus (int sound) const override |
int | readBuffer (int16 *buffer, const int numSamples) override |
bool | isStereo () const override |
bool | endOfData () const override |
int | getRate () const override |
Public Member Functions inherited from Audio::AudioStream | |
virtual bool | endOfStream () const |
Public Member Functions inherited from Scumm::MusicEngine | |
virtual void | setSfxVolume (int vol) |
virtual void | startSoundWithTrackID (int sound, int track) |
virtual int | getMusicTimer () |
virtual void | setQuality (int qual) |
virtual void | toggleMusic (bool enable) |
virtual void | toggleSoundEffects (bool enable) |
void | saveLoadWithSerializer (Common::Serializer &ser) override |
virtual void | restoreAfterLoad () |
Scumm NES sound/music driver.
|
overridevirtual |
Set the output volume for music. Also used, if the inheriting class doesn't distinguish between music and sfx.
vol | the new output volume |
Implements Scumm::MusicEngine.
|
overridevirtual |
Start playing the sound with the given id.
sound | the sound to start |
Implements Scumm::MusicEngine.
|
overridevirtual |
Stop playing the sound with the given id.
sound | the sound to stop |
Implements Scumm::MusicEngine.
|
overridevirtual |
Start playing all currently playing sounds.
Implements Scumm::MusicEngine.
|
overridevirtual |
Query the status of the sound with the given id. Usually this is just a boolean telling us whether the sound is playing or not.
sound | the sound to for which we want the status |
Implements Scumm::MusicEngine.
|
overridevirtual |
Fill the given buffer with up to numSamples
samples.
Data must be in native endianness, 16 bits per sample, signed. For stereo stream, the buffer will be filled with interleaved left and right channel samples, starting with the left sample. Furthermore, the samples in the left and right are summed up. So if you request 4 samples from a stereo stream, you will get a total of two left channel and two right channel samples.
Implements Audio::AudioStream.
|
inlineoverridevirtual |
Check whether this is a stereo stream.
Implements Audio::AudioStream.
|
inlineoverridevirtual |
Check whether end of data has been reached.
If this returns true, it indicates that at this time there is no data available in the stream. However, there might be more data in the future.
This is used by e.g. a rate converter to decide whether to keep on converting data or to stop.
Implements Audio::AudioStream.
|
inlineoverridevirtual |
Sample rate of the stream.
Implements Audio::AudioStream.