Contains sample data.
More...
#include <synthclone/sample.h>
|
| void | setTemporary (bool temporary) |
| | Sets a boolean indicating whether or not the file referenced by this object will be deleted when this object is destroyed. More...
|
| |
|
| | Sample (bool temporary=true, QObject *parent=0) |
| | Initializes an empty sample object. More...
|
| |
| | Sample (const QString &path, bool temporary=false, QObject *parent=0) |
| | Initializes a sample object. More...
|
| |
| | Sample (const Sample &sample, bool temporary=true, QObject *parent=0) |
| | Initializes a sample object. More...
|
| |
| | Sample (const Sample &sample, const QString &path, bool temporary=false, QObject *parent=0) |
| | Initializes a sample object. More...
|
| |
| | ~Sample () |
| | If the file linked to this sample object is a temporary file, then the temporary file is deleted. More...
|
| |
| QString | getPath () const |
| | Gets the path to the file holding this sample. More...
|
| |
| bool | isTemporary () const |
| | Returns a boolean indicating whether or not the file referenced by this object will be deleted when this object is destroyed. More...
|
| |
Contains sample data.
Sample data is kept in a file to conserve memory. To access the sample data, use the SampleInputStream class. To write sample data, use the SampleOutputStream class.
◆ Sample() [1/4]
| synthclone::Sample::Sample |
( |
bool |
temporary = true, |
|
|
QObject * |
parent = 0 |
|
) |
| |
|
explicit |
Initializes an empty sample object.
Sample contents are stored in a file in the system's temporary directory. This constructor should be used when a SampleOutputStream object will be used to write data to this sample.
- Parameters
-
| temporary | Whether or not the file associated with the sample should be removed when the sample object is deleted. |
| parent | The parent object of the new sample. |
◆ Sample() [2/4]
| synthclone::Sample::Sample |
( |
const QString & |
path, |
|
|
bool |
temporary = false, |
|
|
QObject * |
parent = 0 |
|
) |
| |
|
explicit |
Initializes a sample object.
This constructor should be used when a SampleOutputStream object will be used to write data to this sample, or when there is already sample data available at the given path.
- Parameters
-
| path | The file path this sample object should use. |
| temporary | Whether or not the file associated with the sample should be removed when the sample object is deleted. |
| parent | The parent object of the new sample. |
◆ Sample() [3/4]
| synthclone::Sample::Sample |
( |
const Sample & |
sample, |
|
|
bool |
temporary = true, |
|
|
QObject * |
parent = 0 |
|
) |
| |
|
explicit |
Initializes a sample object.
Sample contents are stored in a file in the system's temporary directory.
- Parameters
-
| sample | A sample object. Sample contents will be copied from this object to the new sample object. |
| temporary | Whether or not the file associated with the sample should be removed when the sample object is deleted. |
| parent | The parent object of the new sample. |
◆ Sample() [4/4]
| synthclone::Sample::Sample |
( |
const Sample & |
sample, |
|
|
const QString & |
path, |
|
|
bool |
temporary = false, |
|
|
QObject * |
parent = 0 |
|
) |
| |
Initializes a sample object.
- Parameters
-
| sample | A sample object. Sample contents will be copied from this object to the new sample object. |
| path | The file path this sample object should use. |
| temporary | Whether or not the file associated with the sample should be removed when the sample object is deleted. |
| parent | The parent object of the new sample. |
◆ ~Sample()
| synthclone::Sample::~Sample |
( |
| ) |
|
If the file linked to this sample object is a temporary file, then the temporary file is deleted.
Otherwise, nothing happens.
◆ getPath()
| QString synthclone::Sample::getPath |
( |
| ) |
const |
Gets the path to the file holding this sample.
- Returns
- The path.
◆ isTemporary()
| bool synthclone::Sample::isTemporary |
( |
| ) |
const |
Returns a boolean indicating whether or not the file referenced by this object will be deleted when this object is destroyed.
- Returns
- The specified boolean.
◆ setTemporary
| void synthclone::Sample::setTemporary |
( |
bool |
temporary | ) |
|
|
slot |
Sets a boolean indicating whether or not the file referenced by this object will be deleted when this object is destroyed.
- Parameters
-
| temporary | The specified boolean. |
◆ temporaryChanged
| void synthclone::Sample::temporaryChanged |
( |
bool |
temporary | ) |
|
|
signal |
Emitted when the temporary flag changes.
- Parameters
-
| temporary | The specified flag. |
◆ SampleInputStream
◆ SampleOutputStream
The documentation for this class was generated from the following file: