$darkmode
Component capable of capturing and playing back audio. More...
#include <synthclone/sampler.h>
Signals | |
| void | jobAborted () |
| Emitted when a job has been aborted. More... | |
| void | jobCompleted () |
| Emitted when a job finishes. More... | |
| void | jobError (const QString &message) |
| Emitted when a job cannot be completed due to an error. More... | |
Signals inherited from synthclone::Component | |
| void | nameChanged (const QString &name) |
| Emitted when the Component name is changed. More... | |
| void | progressChanged (float progress) |
| Emitted by the Component to indicate progress in whatever operation the Component is performing. More... | |
| void | statusChanged (const QString &status) |
| Emitted when the Component object's status changes. More... | |
Public Member Functions | |
| virtual void | abortJob ()=0 |
| Aborts the current job. More... | |
| virtual void | startJob (const SamplerJob &job, SampleStream &stream)=0 |
| Starts a new job. More... | |
Public Member Functions inherited from synthclone::Component | |
| QString | getName () const |
| Gets the Component name. More... | |
Protected Member Functions | |
| Sampler (const QString &name, QObject *parent=0) | |
| Constructs a new Sampler. More... | |
| virtual | ~Sampler () |
Protected Member Functions inherited from synthclone::Component | |
| Component (const QString &name, QObject *parent=0) | |
| Constructs a new Component object. More... | |
| virtual | ~Component () |
| Destroys a Component object. More... | |
Additional Inherited Members | |
Public Slots inherited from synthclone::Component | |
| void | setName (const QString &name) |
| Sets the name of this Component. More... | |
Component capable of capturing and playing back audio.
|
explicitprotected |
Constructs a new Sampler.
This constructor cannot be called directly; instead, subclasses should call this constructor in their constructors.
| name | The initial name for the sampler. |
| parent | The parent object of the sampler. |
|
protectedvirtual |
|
pure virtual |
Aborts the current job.
It's possible for this method to be called before the session reflects that the current job is done, but after the Sampler has finished the current job. In that case, this method should do nothing.
|
signal |
Emitted when a job has been aborted.
|
signal |
Emitted when a job finishes.
|
signal |
Emitted when a job cannot be completed due to an error.
| message | The error message. |
|
pure virtual |
Starts a new job.
Jobs should be run asynchronously, and should be able to be aborted within a reasonable time interval. How the job is handled depends on the job type.
If the job's type is:
... then:
If an error occurs during the playing process:
If abort() is called during the playing process:
If the job's type is:
... then:
If an error occurs during the sampling process:
If abort() is called during this operation:
| job | The job to be run. |
| stream | A stream object. If the job type is: ... then the object will be a SampleInputStream. If the job type is: ... then the object will be a SampleOutputStream. Use qobject_cast to cast the object to the appropriate type. |