Logo Search packages:      
Sourcecode: scummvm version File versions  Download package

Scumm::Player_V2 Class Reference

#include <player_v2.h>

Inheritance diagram for Scumm::Player_V2:

Audio::AudioStream Scumm::MusicEngine Scumm::Player_V1

List of all members.

Detailed Description

Scumm V2 PC-Speaker MIDI driver. This simulates the pc speaker sound, which is driven by the 8253 (square wave generator) and a low-band filter.

Definition at line 74 of file player_v2.h.

Public Member Functions

bool endOfData () const
virtual bool endOfStream () const
virtual int getMusicTimer () const
int getRate () const
virtual int getSoundStatus (int sound) const
bool isStereo () const
 Player_V2 (ScummEngine *scumm, Audio::Mixer *mixer, bool pcjr)
int readBuffer (int16 *buffer, const int numSamples)
virtual void setMusicVolume (int vol)
virtual void startSound (int sound)
virtual void stopAllSounds ()
virtual void stopSound (int sound)
virtual void terminate ()

Static Public Member Functions

static AudioStream * openStreamFile (const Common::String &basename, uint32 startTime=0, uint32 duration=0, uint numLoops=1)

Protected Member Functions

virtual void chainNextSound ()
virtual void chainSound (int nr, byte *data)
virtual void clear_channel (int i)
virtual void generatePCjrSamples (int16 *data, uint len)
virtual void generateSpkSamples (int16 *data, uint len)
void lowPassFilter (int16 *data, uint len)
void mutex_down ()
void mutex_up ()
virtual void nextTick ()
void squareGenerator (int channel, int freq, int vol, int noiseFeedback, int16 *sample, uint len)

Protected Attributes

byte * _current_data
int _current_nr
unsigned int _decay
int _header_len
bool _isV3Game
int _level
byte * _next_data
int _next_nr
uint32 _next_tick
bool _pcjr
byte * _retaddr
unsigned int _RNG
uint32 _sample_rate
Audio::SoundHandle _soundHandle
uint32 _tick_len
int _timer_count [4]
int _timer_output
unsigned int _update_step
unsigned int _volumetable [16]

Private Member Functions

void do_mix (int16 *buf, uint len)
void execute_cmd (ChannelInfo *channel)
void next_freqs (ChannelInfo *channel)
void set_pcjr (bool pcjr)

Private Attributes

ChannelInfo _channels [5]
const uint16 * _freqs_table
int _music_timer
int _music_timer_ctr
Common::Mutex _mutex
int _ticks_per_music_timer


union  ChannelInfo

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index