#include <asound.h>
Public Member Functions | |
| ASound (Audio::Mixer *mixer, OPL::OPL *opl, const Common::Path &filename, int dataOffset) | |
| ~ASound () override | |
| int | stop () override |
| int | poll () override |
| void | noise () override |
| int | getFrameCounter () |
| CachedDataEntry & | getCachedData (byte *pData) |
| void | setVolume (int volume) override |
Public Member Functions inherited from MADS::SoundDriver | |
| SoundDriver (Audio::Mixer *mixer, OPL::OPL *opl) | |
| virtual int | command (int commandId, int param)=0 |
Static Public Member Functions | |
| static void | validate () |
Public Attributes | |
| AdlibChannel | _channels [9] |
| AdlibChannel * | _activeChannelPtr |
| AdlibChannelData | _channelData [11] |
| Common::Array< AdlibSample > | _samples |
| AdlibSample * | _samplePtr |
| Common::File | _soundFile |
| Common::Queue< RegisterValue > | _queue |
| Common::Mutex | _driverMutex |
| int | _dataOffset |
| int | _frameCounter |
| bool | _isDisabled |
| int | _v1 |
| int | _v2 |
| int | _activeChannelNumber |
| int | _freqMask1 |
| int | _freqMask2 |
| int | _freqBase1 |
| int | _freqBase2 |
| int | _channelNum1 |
| int | _channelNum2 |
| int | _v7 |
| int | _v8 |
| int | _v9 |
| int | _v10 |
| int | _pollResult |
| int | _resultFlag |
| byte | _nullData [2] |
| int | _ports [256] |
| bool | _stateFlag |
| int | _activeChannelReg |
| int | _v11 |
| bool | _amDep |
| bool | _vibDep |
| bool | _splitPoint |
Protected Member Functions | |
| virtual void | channelCommand (byte *&pSrc, bool &updateFlag)=0 |
| void | loadSample (int sampleIndex) |
| void | write (int reg, int val) |
| int | write2 (int state, int reg, int val) |
| void | flush () |
| void | channelOn (int reg, int volume) |
| void | channelOff (int reg) |
| void | resultCheck () |
| byte * | loadData (int offset, int size) |
| void | playSound (int offset, int size) |
| void | playSoundData (byte *pData, int startingChannel=5) |
| bool | isSoundActive (byte *pData) |
| void | setFrequency (int channel, int freq) |
| int | getRandomNumber () |
| byte * | getDataPtr (int nearPtr) |
| virtual int | command0 () |
| int | command1 () |
| int | command2 () |
| int | command3 () |
| int | command4 () |
| int | command5 () |
| int | command6 () |
| int | command7 () |
| int | command8 () |
| int | nullCommand () |
Protected Attributes | |
| int | _chanCommandCount |
| int | _commandParam |
Protected Attributes inherited from MADS::SoundDriver | |
| Audio::Mixer * | _mixer |
| OPL::OPL * | _opl |
Base class for the sound player resource files
| MADS::Nebular::ASound::ASound | ( | Audio::Mixer * | mixer, |
| OPL::OPL * | opl, | ||
| const Common::Path & | filename, | ||
| int | dataOffset | ||
| ) |
Constructor
| mixer | Mixer |
| opl | OPL |
| filename | Specifies the adlib sound player file to use |
| dataOffset | Offset in the file of the data segment |
|
override |
Destructor
|
protected |
Loads up the specified sample
|
protected |
Queue a byte for an Adlib register
|
protected |
Queue a byte for an Adlib register, and store it in the _ports array
|
protected |
Flush any pending Adlib register values to the OPL driver
|
protected |
Turn a channel on
|
protected |
Turn a channel off
|
protected |
Checks for whether a poll result needs to be set
|
protected |
Loads a data block from the sound file, caching the result for any future calls for the same data
|
protected |
Play the specified sound
| offset | Offset of sound data within sound player data segment |
| size | Size of sound data block |
|
protected |
Play the specified raw sound data
| pData | Pointer to data block containing sound data |
| startingChannel | Channel to start scan from |
|
protected |
Checks to see whether the given block of data is already loaded into a channel.
|
protected |
Sets the frequency for a given channel.
|
protected |
Returns a 16-bit random number
|
protected |
Converts a 16-bit near pointer (data-segment offset) to a C++ byte pointer by searching the data cache for the matching block.
|
static |
Validates the Adlib sound files
|
overridevirtual |
Stop all currently playing sounds
Implements MADS::SoundDriver.
|
overridevirtual |
Main poll method to allow sounds to progress
Reimplemented from MADS::SoundDriver.
|
overridevirtual |
General noise/note output
Implements MADS::SoundDriver.
|
inline |
Return the current frame counter
| CachedDataEntry& MADS::Nebular::ASound::getCachedData | ( | byte * | pData | ) |
Return the cached data block record for previously loaded sound data
|
overridevirtual |
Set the volume
Implements MADS::SoundDriver.