Forwards PortAudio source (microphone, line-input or other capture source) to the DSPNetwork. More...
#include <Resonant/PortAudioSource.hpp>
Public Types | |
| enum | OpenResult { SUCCESS, PA_INIT_ERROR, PA_DEVICE_NOT_FOUND, NO_INPUT_CHANNELS, PA_OPEN_ERROR, PA_START_ERROR } |
Public Member Functions | |
| void | close () |
| Synchronously closes the input source. | |
| ModuleBufferPlayerPtr | module () const |
| OpenResult | open (const QString &deviceName, QString *errorMessage) |
| Synchronously opens an input source. More... | |
| QList< SourceInfo > | sources (QString *errorMessage) |
| ~PortAudioSource () | |
| Calls close if the player wasn't closed already. | |
Forwards PortAudio source (microphone, line-input or other capture source) to the DSPNetwork.
PortAudio will most likely spawn a new thread when using this class. First open the source, and then add module() to DSPNetwork manually.
| OpenResult Resonant::PortAudioSource::open | ( | const QString & | deviceName, |
| QString * | errorMessage | ||
| ) |
Synchronously opens an input source.
| deviceName | full name matching the PortAudio device name (use ListPortAudioDevices to list them all), or just ALSA name like "hw:2,0" in the same format how PortAudio prints it. |
| errorMessage[out] | Error message |