#include <paula.h>
Classes | |
struct | Channel |
struct | FilterState |
struct | Offset |
Public Member Functions | |
Paula (bool stereo=false, int rate=44100, uint interruptFreq=0, FilterMode filterMode=kFilterModeDefault, int periodScaleDivisor=1) | |
bool | playing () const |
void | setTimerBaseValue (uint32 ticksPerSecond) |
uint32 | getTimerBaseValue () |
void | setSingleInterrupt (uint sampleDelay) |
void | setSingleInterruptUnscaled (uint timerDelay) |
void | setInterruptFreq (uint sampleDelay) |
void | setInterruptFreqUnscaled (uint timerDelay) |
void | clearVoice (byte voice) |
void | clearVoices () |
void | startPlay () |
void | stopPlay () |
void | pausePlay (bool pause) |
int | readBuffer (int16 *buffer, const int numSamples) |
bool | isStereo () const |
bool | endOfData () const |
int | getRate () const |
Public Member Functions inherited from Audio::AudioStream | |
virtual bool | endOfStream () const |
Static Public Attributes | |
static const int | NUM_VOICES = 4 |
static const int | PANNING_LEFT = 63 |
static const int | PANNING_RIGHT = 191 |
Protected Member Functions | |
virtual void | interrupt ()=0 |
virtual void | interruptChannel (byte channel) |
void | startPaula () |
void | stopPaula () |
void | setChannelPanning (byte channel, byte panning) |
void | disableChannel (byte channel) |
void | enableChannel (byte channel) |
void | setChannelInterrupt (byte channel, bool enable) |
void | setChannelPeriod (byte channel, int16 period) |
void | setChannelVolume (byte channel, byte volume) |
void | setChannelSampleStart (byte channel, const int8 *data) |
void | setChannelSampleLen (byte channel, uint32 length) |
void | setChannelData (uint8 channel, const int8 *data, const int8 *dataRepeat, uint32 length, uint32 lengthRepeat, int32 offset=0) |
void | setChannelOffset (byte channel, Offset offset) |
Offset | getChannelOffset (byte channel) |
int | getChannelDmaCount (byte channel) |
void | setChannelDmaCount (byte channel, int dmaVal=0) |
void | setAudioFilter (bool enable) |
Protected Attributes | |
bool | _end |
Common::Mutex & | _mutex |
Emulation of the "Paula" Amiga music chip The interrupt frequency specifies the number of mixed wavesamples between calls of the interrupt method
|
virtual |
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.
|
inlinevirtual |
Check whether this is a stereo stream.
Implements Audio::AudioStream.
|
inlinevirtual |
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.
|
inlinevirtual |
Sample rate of the stream.
Implements Audio::AudioStream.