5 #include <QAudioOutput>
56 virtual qint64
readData(
char * data, qint64 maxSize);
59 virtual qint64
writeData(
const char * , qint64 maxSize) {
return maxSize;}
62 void MixSamples(int16 * mixTo, uint32 numSamplesToMix, uint32 inputSampleOffset, uint64 notesChord)
const;
64 QAudioOutput * _audioOutput;
65 uint64 _localNotesChord;
66 uint64 _sampleCounter;
69 uint32 _maxNoteLengthSamples;
71 Hashtable<uint64, uint64> _sampleIndexToNotesChord;
void SetLocalNoteAssignments(quint64 notesChord)
Tells Quasimodo which bells he should actually play.
This object is in charge of actually ringing the local bells (using QAudioOutput and a mixer algorith...
virtual qint64 writeData(const char *, qint64 maxSize)
This method is a no-op and should never be called.
virtual qint64 readData(char *data, qint64 maxSize)
Overridden to fill (data) with audio samples from our internal sound-mixing-engine.
void SetupTheBells()
Should be called once at startup, since setting them up in the constructor causes thread-warnings...
Quasimodo(QObject *parent=NULL)
Constructor.
void RingSomeBells(quint64 notesChord, bool localNotesOnly)
Causes a given bell-sound to be played.
The choir namespace contains the code specific to the ZGChoir demonstration application.
void DestroyTheBells()
Should be called once at shutdown, since destroying the bells in the destructor causes more thread-wa...
void RangLocalBells(quint64 notesChord)
Emitted when we've played some bell sounds.