kwave
18.07.70
|
#include <TrackWriter.h>
Public Member Functions | |
TrackWriter (Kwave::Track &track, Kwave::InsertMode mode, sample_index_t left=0, sample_index_t right=0) | |
virtual | ~TrackWriter () Q_DECL_OVERRIDE |
virtual bool | write (const Kwave::SampleArray &buffer, unsigned int &count) Q_DECL_OVERRIDE |
![]() | |
Writer () | |
Writer (Kwave::InsertMode mode, sample_index_t left=0, sample_index_t right=0) | |
virtual | ~Writer () Q_DECL_OVERRIDE |
virtual Writer & | operator<< (const Kwave::SampleArray &samples) |
virtual Writer & | operator<< (const sample_t &sample) |
Writer & | operator<< (Writer &(*modifier)(Writer &)) |
Writer & | operator<< (Kwave::SampleReader &reader) |
bool | flush () |
virtual bool | eof () const |
virtual bool | done () const Q_DECL_OVERRIDE |
sample_index_t | first () const |
sample_index_t | last () const |
sample_index_t | position () const |
Kwave::InsertMode | mode () const |
![]() | |
SampleSink (QObject *parent=Q_NULLPTR) | |
virtual | ~SampleSink () |
![]() | |
StreamObject (QObject *parent=Q_NULLPTR) | |
virtual | ~StreamObject () |
virtual unsigned int | tracks () const |
virtual Kwave::StreamObject * | operator[] (unsigned int track) |
virtual unsigned int | tracksOfPort (const char *port) const |
virtual Kwave::StreamObject * | port (const char *port, unsigned int track) |
virtual unsigned int | blockSize () const |
void | setAttribute (const char *attribute, const QVariant &value) |
Private Attributes | |
Kwave::Track & | m_track |
QTime | m_progress_time |
Additional Inherited Members | |
![]() | |
void | input (Kwave::SampleArray data) |
![]() | |
void | sigSamplesWritten (sample_index_t) |
void | proceeded () |
![]() | |
void | attributeChanged (const QVariant value) |
![]() | |
static void | setInteractive (bool interactive) |
![]() | |
sample_index_t | m_first |
sample_index_t | m_last |
Kwave::InsertMode | m_mode |
sample_index_t | m_position |
Kwave::SampleArray | m_buffer |
unsigned int | m_buffer_size |
unsigned int | m_buffer_used |
Input stream for transferring samples into a Track.
Definition at line 42 of file TrackWriter.h.
Kwave::TrackWriter::TrackWriter | ( | Kwave::Track & | track, |
Kwave::InsertMode | mode, | ||
sample_index_t | left = 0 , |
||
sample_index_t | right = 0 |
||
) |
Constructor, creates a writer for write access to a track.
track | reference to the track |
mode | specifies where and how to insert |
left | start of the input (only useful in insert and overwrite mode) |
right | end of the input (only useful with overwrite mode) |
Definition at line 32 of file TrackWriter.cpp.
References m_progress_time, m_track, and Kwave::Track::use().
|
virtual |
Destructor.
Definition at line 42 of file TrackWriter.cpp.
References Kwave::Writer::flush(), m_track, and Kwave::Track::release().
|
virtual |
Flush the content of a buffer. Normally the buffer is the internal intermediate buffer used for single-sample writes. When using block transfers, the internal buffer is bypassed and the written block is passed instead.
buffer | reference to the buffer to be flushed |
count | number of samples in the buffer to be flushed, will be internally set to zero if successful |
Implements Kwave::Writer.
Definition at line 49 of file TrackWriter.cpp.
References Kwave::Append, Kwave::Insert, Kwave::Writer::m_last, Kwave::Writer::m_mode, Kwave::Writer::m_position, m_progress_time, m_track, MIN_PROGRESS_INTERVAL, Kwave::Overwrite, Kwave::Writer::proceeded(), Kwave::SampleArray::size(), Kwave::toUint(), and Kwave::Track::writeSamples().
|
private |
timer for limiting the number of progress signals per second
Definition at line 84 of file TrackWriter.h.
Referenced by TrackWriter(), and write().
|
private |
the track that receives our data
Definition at line 81 of file TrackWriter.h.
Referenced by TrackWriter(), write(), and ~TrackWriter().