|
synthclone 0.3.0
|
Used to write sample data to a sample file. More...
#include <synthclone/sampleoutputstream.h>
Public Member Functions | |
| SampleOutputStream (Sample &sample, SampleRate sampleRate, SampleChannelCount channels, QObject *parent=0) | |
| Creates a sample output stream object that writes a .wav file with float values. | |
| SampleOutputStream (Sample &sample, SampleRate sampleRate, SampleChannelCount channels, Type type, SubType subType, EndianType endianType=ENDIANTYPE_FILE, QObject *parent=0) | |
| Creates a sample output stream object. | |
| ~SampleOutputStream () | |
| Destroys the stream. | |
| void | write (const float *buffer, SampleFrameCount frames) |
| Writes 'frames' data to the stream. | |
Public Member Functions inherited from synthclone::SampleStream | |
| void | close () |
| Closes the sample stream, which causes any unwritten data to be written to the sample. | |
| SampleChannelCount | getChannels () const |
| Gets the channel count for the sample. | |
| EndianType | getEndianType () const |
| Gets the format endian type of the underlying sample. | |
| SampleFrameCount | getFrames () |
| Gets the total number of frames in this sample. | |
| SampleRate | getSampleRate () const |
| Gets the sample rate for this sample. | |
| SubType | getSubType () const |
| Gets the format sub-type of the underlying sample. | |
| Type | getType () const |
| Gets the format type of the underlying sample. | |
| bool | isClosed () const |
| Gets a boolean indicating whether or not the stream is closed. | |
| SampleFrameCount | seek (SampleFrameCount frames, Offset offset) |
| Sets the position of the stream in the sample file. | |
Used to write sample data to a sample file.
The object uses the excellent libsndfile in its implementation, which can be found at http://www.mega-nerd.com/libsndfile/.
| synthclone::SampleOutputStream::SampleOutputStream | ( | Sample & | sample, |
| SampleRate | sampleRate, | ||
| SampleChannelCount | channels, | ||
| QObject * | parent = 0 |
||
| ) |
Creates a sample output stream object that writes a .wav file with float values.
| sample | The sample to write to. |
| sampleRate | The sample rate to use. |
| channels | The channel count. |
| parent | The parent object of the new stream. |
| synthclone::SampleOutputStream::SampleOutputStream | ( | Sample & | sample, |
| SampleRate | sampleRate, | ||
| SampleChannelCount | channels, | ||
| Type | type, | ||
| SubType | subType, | ||
| EndianType | endianType = ENDIANTYPE_FILE, |
||
| QObject * | parent = 0 |
||
| ) |
Creates a sample output stream object.
| sample | The sample to write to. |
| sampleRate | The sample rate to use. |
| channels | The channel count. |
| type | The format type. |
| subType | The format sub-type. |
| endianType | The format endian-type. |
| parent | The parent object of the new stream. |
| synthclone::SampleOutputStream::~SampleOutputStream | ( | ) |
Destroys the stream.
This will close the stream if it isn't closed.
| void synthclone::SampleOutputStream::write | ( | const float * | buffer, |
| SampleFrameCount | frames | ||
| ) |
Writes 'frames' data to the stream.
The data is contained in 'buffer'.