kwave
18.07.70
|
#include <PlayBackDevice.h>
Public Member Functions | |
virtual | ~PlayBackDevice () |
virtual QString | open (const QString &device, double rate, unsigned int channels, unsigned int bits, unsigned int bufbase)=0 |
virtual int | write (const Kwave::SampleArray &samples)=0 |
virtual int | close ()=0 |
virtual QStringList | supportedDevices () |
virtual QString | fileFilter () |
virtual QList< unsigned int > | supportedBits (const QString &device)=0 |
virtual int | detectChannels (const QString &device, unsigned int &min, unsigned int &max) |
Abstract base class for all kinds of playback devices. It provides only a minimum of necessary functions, like opening/closing and writing samples.
Definition at line 46 of file PlayBackDevice.h.
|
inlinevirtual |
Destructor
Definition at line 51 of file PlayBackDevice.h.
References close(), open(), and write().
|
pure virtual |
Closes the output device.
Implemented in Kwave::PlayBackPulseAudio, Kwave::PlayBackQt, Kwave::PlayBackALSA, and Kwave::PlayBackOSS.
Referenced by Kwave::MultiPlaybackSink::~MultiPlaybackSink(), and ~PlayBackDevice().
|
inlinevirtual |
Detect the minimum and maximum number of channels. If the detection fails, minimum and maximum are set to zero.
device | filename of the device |
min | receives the lowest supported number of channels |
max | receives the highest supported number of channels |
Reimplemented in Kwave::PlayBackPulseAudio, Kwave::PlayBackQt, Kwave::PlayBackALSA, and Kwave::PlayBackOSS.
Definition at line 111 of file PlayBackDevice.h.
Referenced by Kwave::PlayBackDialog::setDevice().
|
inlinevirtual |
return a string suitable for a "File Open..." dialog
Reimplemented in Kwave::PlayBackPulseAudio, Kwave::PlayBackQt, Kwave::PlayBackALSA, and Kwave::PlayBackOSS.
Definition at line 90 of file PlayBackDevice.h.
References _, and supportedBits().
Referenced by Kwave::PlayBackDialog::setMethod().
|
pure virtual |
Opens the device for playback.
device | name of the output device, this might be a file name of a device or any user-defined string that tells the playback device where to write data. |
rate | playback rate [samples/second] |
channels | number of playback channels [1=mono, 2=stereo,...] |
bits | resolution for output [bits/sample] |
bufbase | exponent of the buffer size. The real buffer size will be (2 ^ bufbase) bytes. |
Implemented in Kwave::PlayBackPulseAudio, Kwave::PlayBackQt, Kwave::PlayBackALSA, and Kwave::PlayBackOSS.
Referenced by Kwave::PlaybackController::openDevice(), and ~PlayBackDevice().
|
pure virtual |
returns a list of supported bits per sample resolutions of a given device.
device | filename of the device |
Implemented in Kwave::PlayBackPulseAudio, Kwave::PlayBackQt, Kwave::PlayBackALSA, and Kwave::PlayBackOSS.
Referenced by fileFilter(), and Kwave::PlayBackDialog::setDevice().
|
inlinevirtual |
return a string list with supported device names
Reimplemented in Kwave::PlayBackPulseAudio, Kwave::PlayBackQt, Kwave::PlayBackALSA, and Kwave::PlayBackOSS.
Definition at line 85 of file PlayBackDevice.h.
Referenced by Kwave::PlayBackDialog::setDevice(), and Kwave::PlayBackDialog::setMethod().
|
pure virtual |
Writes an array of samples to the output device. Each sample in the array is designated to one output channel.
samples | array of samples for output |
Implemented in Kwave::PlayBackPulseAudio, Kwave::PlayBackQt, Kwave::PlayBackALSA, and Kwave::PlayBackOSS.
Referenced by Kwave::MultiPlaybackSink::input(), Kwave::PlaybackController::run_wrapper(), and ~PlayBackDevice().