diff options
Diffstat (limited to '3rdparty/portaudio/bindings/cpp/source/portaudiocpp/AsioDeviceAdapter.cxx')
-rw-r--r-- | 3rdparty/portaudio/bindings/cpp/source/portaudiocpp/AsioDeviceAdapter.cxx | 106 |
1 files changed, 52 insertions, 54 deletions
diff --git a/3rdparty/portaudio/bindings/cpp/source/portaudiocpp/AsioDeviceAdapter.cxx b/3rdparty/portaudio/bindings/cpp/source/portaudiocpp/AsioDeviceAdapter.cxx index 3efc100f62f..e7fd1ee5fa9 100644 --- a/3rdparty/portaudio/bindings/cpp/source/portaudiocpp/AsioDeviceAdapter.cxx +++ b/3rdparty/portaudio/bindings/cpp/source/portaudiocpp/AsioDeviceAdapter.cxx @@ -9,75 +9,73 @@ namespace portaudio { - AsioDeviceAdapter::AsioDeviceAdapter(Device &device) - { - if (device.hostApi().typeId() != paASIO) - throw PaCppException(PaCppException::UNABLE_TO_ADAPT_DEVICE); + AsioDeviceAdapter::AsioDeviceAdapter(Device &device) + { + if (device.hostApi().typeId() != paASIO) + throw PaCppException(PaCppException::UNABLE_TO_ADAPT_DEVICE); - device_ = &device; + device_ = &device; - PaError err = PaAsio_GetAvailableLatencyValues(device_->index(), &minBufferSize_, &maxBufferSize_, - &preferredBufferSize_, &granularity_); + PaError err = PaAsio_GetAvailableLatencyValues(device_->index(), &minBufferSize_, &maxBufferSize_, + &preferredBufferSize_, &granularity_); - if (err != paNoError) - throw PaException(err); + if (err != paNoError) + throw PaException(err); - } + } - Device &AsioDeviceAdapter::device() - { - return *device_; - } + Device &AsioDeviceAdapter::device() + { + return *device_; + } - long AsioDeviceAdapter::minBufferSize() const - { - return minBufferSize_; - } + long AsioDeviceAdapter::minBufferSize() const + { + return minBufferSize_; + } - long AsioDeviceAdapter::maxBufferSize() const - { - return maxBufferSize_; - } + long AsioDeviceAdapter::maxBufferSize() const + { + return maxBufferSize_; + } - long AsioDeviceAdapter::preferredBufferSize() const - { - return preferredBufferSize_; - } + long AsioDeviceAdapter::preferredBufferSize() const + { + return preferredBufferSize_; + } - long AsioDeviceAdapter::granularity() const - { - return granularity_; - } + long AsioDeviceAdapter::granularity() const + { + return granularity_; + } - void AsioDeviceAdapter::showControlPanel(void *systemSpecific) - { - PaError err = PaAsio_ShowControlPanel(device_->index(), systemSpecific); + void AsioDeviceAdapter::showControlPanel(void *systemSpecific) + { + PaError err = PaAsio_ShowControlPanel(device_->index(), systemSpecific); - if (err != paNoError) - throw PaException(err); - } + if (err != paNoError) + throw PaException(err); + } - const char *AsioDeviceAdapter::inputChannelName(int channelIndex) const - { - const char *channelName; - PaError err = PaAsio_GetInputChannelName(device_->index(), channelIndex, &channelName); + const char *AsioDeviceAdapter::inputChannelName(int channelIndex) const + { + const char *channelName; + PaError err = PaAsio_GetInputChannelName(device_->index(), channelIndex, &channelName); - if (err != paNoError) - throw PaException(err); + if (err != paNoError) + throw PaException(err); - return channelName; - } + return channelName; + } - const char *AsioDeviceAdapter::outputChannelName(int channelIndex) const - { - const char *channelName; - PaError err = PaAsio_GetOutputChannelName(device_->index(), channelIndex, &channelName); + const char *AsioDeviceAdapter::outputChannelName(int channelIndex) const + { + const char *channelName; + PaError err = PaAsio_GetOutputChannelName(device_->index(), channelIndex, &channelName); - if (err != paNoError) - throw PaException(err); + if (err != paNoError) + throw PaException(err); - return channelName; - } + return channelName; + } } - - |