Class managing the generation of sound.
More...
#include <soundgenerator.h>
|
void | timeout () override final |
| Private thread worker function. More...
|
|
Class managing the generation of sound.
Definition at line 42 of file soundgenerator.h.
SoundGenerator::SoundGenerator |
( |
| ) |
|
void SoundGenerator::clearIncrements |
( |
| ) |
|
virtual bool ThreadBase::exit |
( |
| ) |
|
|
inlinevirtualinherited |
virtual void ThreadBase::finallyCalledWorker |
( |
| ) |
|
|
inlineprotectedvirtualinherited |
void SoundGenerator::forceImmediateProcessing |
( |
| ) |
|
|
signal |
quint32 SoundGenerator::getIncrement |
( |
int |
key | ) |
|
size_t SoundGenerator::getMaxPacketSize |
( |
| ) |
|
|
inline |
Sampler& SoundGenerator::getSampler |
( |
| ) |
|
|
inline |
QString ThreadBase::getThreadName |
( |
| ) |
const |
|
inherited |
QList<Tone>* SoundGenerator::getTones |
( |
| ) |
|
|
inline |
int ThreadBase::getVerbosity |
( |
| ) |
|
|
inlineinherited |
void SoundGenerator::handleRequest |
( |
Request & |
request | ) |
|
|
private |
Initialize the SoundGenerator.
- Parameters
-
application | : Pointer to the main application |
voice | : Pointer to the Voice (the collection of scales describing an instrument) |
Definition at line 64 of file soundgenerator.cpp.
bool SoundGenerator::init |
( |
| ) |
|
|
inlineoverridevirtual |
virtual void ThreadBase::initiallyCalledWorker |
( |
| ) |
|
|
inlineprotectedvirtualinherited |
bool ThreadBase::isActive |
( |
| ) |
const |
|
inherited |
Return true if thread is running and not suspended.
Definition at line 136 of file threadbase.cpp.
bool ThreadBase::isInterruptionRequested |
( |
| ) |
const |
|
protectedinherited |
Return true if the thread was requested to interrupt or terminate.
Definition at line 128 of file threadbase.cpp.
void SoundGenerator::lockTones |
( |
| ) |
|
|
inline |
void SoundGenerator::manageToneDynamics |
( |
| ) |
|
|
private |
virtual void ThreadBase::periodicallyCalledWorker |
( |
| ) |
|
|
inlineprotectedvirtualinherited |
bool SoundGenerator::queueFilled |
( |
| ) |
|
|
private |
void SoundGenerator::receiveTuningCorrections |
( |
QMap< int, double > |
corrections | ) |
|
|
slot |
void SoundGenerator::registerAllNotesOff |
( |
| ) |
|
void SoundGenerator::registerRequest |
( |
Request & |
request | ) |
|
Register a single request to play a note in the queue.
This function is thread-safe and appends a request in the local mQueue.
- Parameters
-
request | : Reference to the Request to be registered |
- See also
- Request
Definition at line 102 of file soundgenerator.cpp.
void ThreadBase::resume |
( |
| ) |
|
|
virtualinherited |
Resume from the suspend mode.
Restart the timer and clear the mSuspended flag
Reimplemented in MidiPlayer.
Definition at line 99 of file threadbase.cpp.
void SoundGenerator::setIncrement |
( |
int |
key, |
|
|
quint32 |
increment |
|
) |
| |
void SoundGenerator::setMaxPacketSize |
( |
int |
n | ) |
|
|
inline |
void ThreadBase::setPriority |
( |
const QThread::Priority |
p | ) |
|
|
protectedinherited |
void SoundGenerator::setSoftPedal |
( |
bool |
pressed | ) |
|
|
slot |
void SoundGenerator::setSostenutoPedal |
( |
bool |
pressed | ) |
|
|
slot |
void SoundGenerator::setSustainPedal |
( |
bool |
pressed | ) |
|
|
slot |
void ThreadBase::setThreadName |
( |
const QString |
name | ) |
|
|
protectedinherited |
void ThreadBase::setTimerInterval |
( |
const int |
msec, |
|
|
const int |
firstMsec = 0 |
|
) |
| |
|
protectedinherited |
Set timer interval for the periodically called worker.
Definition at line 117 of file threadbase.cpp.
void ThreadBase::setVerbosity |
( |
int |
verbosity | ) |
|
|
inherited |
bool ThreadBase::start |
( |
| ) |
|
|
virtualinherited |
Start the thread.
Starts the thread. If the thread is suspended it will resume. If the thread is already started the function does nothing.
- Returns
- True on succes
Reimplemented in Tuner, and AudioOutput.
Definition at line 64 of file threadbase.cpp.
bool ThreadBase::stop |
( |
| ) |
|
|
virtualinherited |
Stop the thread.
Send a termination request to the execution loop. Wait for the thread to terminate. The active components of the thread should call isInterruptionRequested() and quit immediately if this function is true.
- Returns
- If the thread terminates regularly return true. If the thread does not terminate after a timeout of 2 secs return false.
Reimplemented in MidiPlayer, AudioOutput, and Instrument.
Definition at line 152 of file threadbase.cpp.
void SoundGenerator::suspend |
( |
| ) |
|
|
finaloverridevirtual |
Mark the thread as suspended.
Calling this function tells the thread that it has to wait in some sort of standby. Note that the thread itself is not terminated and that the event loop is still active. Calling this function stops the timer so that the periodicallyCalledWorker() is not active any more. In addition the mSuspended flag is set.
Reimplemented from ThreadBase.
Definition at line 77 of file soundgenerator.cpp.
void SoundGenerator::timeout |
( |
| ) |
|
|
finaloverrideprivateslot |
void SoundGenerator::unlockTones |
( |
| ) |
|
|
inline |
QMutex SoundGenerator::mIncrementMutex |
|
private |
QVector<quint32> SoundGenerator::mIncrements |
|
private |
QQueue<Request> SoundGenerator::mQueue |
|
private |
QMutex SoundGenerator::mQueueMutex |
|
private |
bool SoundGenerator::mSoftPedal |
|
private |
bool SoundGenerator::mSostenutoPedal |
|
private |
bool SoundGenerator::mSustainPedeal |
|
private |
QMutex SoundGenerator::mToneMutex |
|
private |
QList<Tone> SoundGenerator::mTones |
|
private |
Voice* SoundGenerator::pVoice |
|
private |
The documentation for this class was generated from the following files: