kwave
18.07.70
|
#include <RecordDevice.h>
Public Member Functions | |
RecordDevice () | |
virtual | ~RecordDevice () |
virtual QString | open (const QString &dev)=0 |
virtual int | read (QByteArray &buffer, unsigned int offset)=0 |
virtual int | close ()=0 |
virtual QStringList | supportedDevices ()=0 |
virtual QString | fileFilter () |
virtual int | detectTracks (unsigned int &min, unsigned int &max)=0 |
virtual int | setTracks (unsigned int &tracks)=0 |
virtual int | tracks ()=0 |
virtual QList< double > | detectSampleRates ()=0 |
virtual int | setSampleRate (double &new_rate)=0 |
virtual double | sampleRate ()=0 |
virtual QList< Kwave::Compression::Type > | detectCompressions ()=0 |
virtual int | setCompression (Kwave::Compression::Type new_compression)=0 |
virtual Kwave::Compression::Type | compression ()=0 |
virtual QList< unsigned int > | supportedBits ()=0 |
virtual int | setBitsPerSample (unsigned int new_bits)=0 |
virtual int | bitsPerSample ()=0 |
virtual QList< Kwave::SampleFormat::Format > | detectSampleFormats ()=0 |
virtual int | setSampleFormat (Kwave::SampleFormat::Format new_format)=0 |
virtual Kwave::SampleFormat::Format | sampleFormat ()=0 |
virtual Kwave::byte_order_t | endianness ()=0 |
Definition at line 37 of file RecordDevice.h.
|
inline |
|
inlinevirtual |
Destructor
Definition at line 45 of file RecordDevice.h.
References close(), open(), read(), and supportedDevices().
|
pure virtual |
Returns the current resolution in bits per sample or a negative error code if failed
Implemented in Kwave::RecordALSA, Kwave::RecordOSS, Kwave::RecordPulseAudio, and Kwave::RecordQt.
Referenced by Kwave::RecordPlugin::changeBitsPerSample(), fileFilter(), Kwave::RecordPlugin::paramsValid(), and Kwave::RecordPlugin::setupRecordThread().
|
pure virtual |
Close the device
Implemented in Kwave::RecordPulseAudio, Kwave::RecordQt, Kwave::RecordALSA, and Kwave::RecordOSS.
Referenced by Kwave::RecordPlugin::closeDevice(), and ~RecordDevice().
|
pure virtual |
Returns the current compression type (0==none)
Implemented in Kwave::RecordALSA, Kwave::RecordOSS, Kwave::RecordPulseAudio, and Kwave::RecordQt.
Referenced by Kwave::RecordPlugin::changeCompression(), and fileFilter().
|
pure virtual |
Gets a list of supported compression types. If no compression is supported, the list might be empty.
Implemented in Kwave::RecordPulseAudio, Kwave::RecordQt, Kwave::RecordALSA, and Kwave::RecordOSS.
Referenced by Kwave::RecordPlugin::changeCompression(), and fileFilter().
|
pure virtual |
Gets a list of supported sample formats.
Implemented in Kwave::RecordALSA, Kwave::RecordOSS, Kwave::RecordPulseAudio, and Kwave::RecordQt.
Referenced by Kwave::RecordPlugin::changeSampleFormat(), and fileFilter().
|
pure virtual |
get a list of supported sample rates
Implemented in Kwave::RecordPulseAudio, Kwave::RecordQt, Kwave::RecordALSA, and Kwave::RecordOSS.
Referenced by Kwave::RecordPlugin::changeSampleRate(), and fileFilter().
|
pure virtual |
Detect the minimum and maximum number of tracks. If the detection fails, minimum and maximum are set to zero.
min | receives the lowest supported number of tracks |
max | receives the highest supported number of tracks |
Implemented in Kwave::RecordPulseAudio, Kwave::RecordQt, Kwave::RecordALSA, and Kwave::RecordOSS.
Referenced by Kwave::RecordPlugin::changeTracks(), and fileFilter().
|
pure virtual |
Returns the current endianness (big/little)
Implemented in Kwave::RecordALSA, Kwave::RecordOSS, Kwave::RecordPulseAudio, and Kwave::RecordQt.
Referenced by fileFilter(), Kwave::RecordPlugin::paramsValid(), and Kwave::RecordPlugin::setupRecordThread().
|
inlinevirtual |
return a string suitable for a "File Open..." dialog
Reimplemented in Kwave::RecordOSS.
Definition at line 75 of file RecordDevice.h.
References _, bitsPerSample(), compression(), detectCompressions(), detectSampleFormats(), detectSampleRates(), detectTracks(), endianness(), sampleFormat(), sampleRate(), setBitsPerSample(), setCompression(), setSampleFormat(), setSampleRate(), setTracks(), supportedBits(), and tracks().
Referenced by Kwave::RecordPlugin::setMethod().
|
pure virtual |
Open the record device.
dev | path of the record device |
QString() | if successful |
QString::number(ENODEV) | if device not found |
QString::number(EBUSY) | if device is busy |
QString::number(EINVAL) | on invalid parameters |
QString(...) | device specific error message (already translated) |
Implemented in Kwave::RecordPulseAudio, Kwave::RecordQt, Kwave::RecordALSA, and Kwave::RecordOSS.
Referenced by Kwave::RecordPlugin::setDevice(), and ~RecordDevice().
|
pure virtual |
Read the raw audio data from the record device.
buffer | array of bytes to receive the audio data might be resized for alignment |
offset | offset in bytes within the buffer |
Implemented in Kwave::RecordPulseAudio, Kwave::RecordQt, Kwave::RecordALSA, and Kwave::RecordOSS.
Referenced by Kwave::RecordThread::run(), and ~RecordDevice().
|
pure virtual |
Returns the current sample format (signed/unsigned)
Implemented in Kwave::RecordALSA, Kwave::RecordOSS, Kwave::RecordPulseAudio, and Kwave::RecordQt.
Referenced by Kwave::RecordPlugin::changeSampleFormat(), fileFilter(), Kwave::RecordPlugin::paramsValid(), and Kwave::RecordPlugin::setupRecordThread().
|
pure virtual |
Returns the current sample rate of the device
Implemented in Kwave::RecordPulseAudio, Kwave::RecordQt, Kwave::RecordALSA, and Kwave::RecordOSS.
Referenced by Kwave::RecordPlugin::changeSampleRate(), and fileFilter().
|
pure virtual |
Set the resolution in bits per sample
new_bits | resolution [bits/sample] |
Implemented in Kwave::RecordALSA, Kwave::RecordOSS, Kwave::RecordPulseAudio, and Kwave::RecordQt.
Referenced by Kwave::RecordPlugin::changeBitsPerSample(), and fileFilter().
|
pure virtual |
Try to set a new compression type.
new_compression | the identifier of the new compression |
Implemented in Kwave::RecordALSA, Kwave::RecordPulseAudio, Kwave::RecordOSS, and Kwave::RecordQt.
Referenced by Kwave::RecordPlugin::changeCompression(), and fileFilter().
|
pure virtual |
Try to set a new sample format (signed/unsigned)
new_format | the identifier for the new format |
Implemented in Kwave::RecordALSA, Kwave::RecordOSS, Kwave::RecordPulseAudio, and Kwave::RecordQt.
Referenced by Kwave::RecordPlugin::changeSampleFormat(), and fileFilter().
|
pure virtual |
Try to set a new sample rate.
new_rate | the sample rate to be set [samples/second], can be modified and rounded up/down to the nearest supported sample rate if the underlying driver supports that. |
Implemented in Kwave::RecordPulseAudio, Kwave::RecordQt, Kwave::RecordALSA, and Kwave::RecordOSS.
Referenced by Kwave::RecordPlugin::changeSampleRate(), and fileFilter().
|
pure virtual |
Try to set a new number of tracks.
tracks | the number of tracks to be set, can be modified and decreased to the next supported number of tracks if the underlying driver supports that. |
Implemented in Kwave::RecordPulseAudio, Kwave::RecordQt, Kwave::RecordALSA, and Kwave::RecordOSS.
Referenced by Kwave::RecordPlugin::changeTracks(), and fileFilter().
|
pure virtual |
Detect a list of supported bits per sample.
Implemented in Kwave::RecordALSA, Kwave::RecordOSS, Kwave::RecordPulseAudio, and Kwave::RecordQt.
Referenced by Kwave::RecordPlugin::changeBitsPerSample(), and fileFilter().
|
pure virtual |
return a string list with supported device names
Implemented in Kwave::RecordPulseAudio, Kwave::RecordQt, Kwave::RecordALSA, and Kwave::RecordOSS.
Referenced by Kwave::RecordPlugin::setDevice(), Kwave::RecordPlugin::setMethod(), and ~RecordDevice().
|
pure virtual |
Returns the current number of tracks
Implemented in Kwave::RecordPulseAudio, Kwave::RecordQt, Kwave::RecordALSA, and Kwave::RecordOSS.
Referenced by Kwave::RecordPlugin::changeTracks(), and fileFilter().