Mercurial > hg > sv-dependency-builds
view src/portaudio_20161030/bindings/cpp/source/portaudiocpp/InterfaceCallbackStream.cxx @ 163:5cc1366da2e9
Apply patch from Tim Bunnell on PortAudio mailing list (2016-12-28, Mac 10.11 deprecation warning)
author | Chris Cannam <cannam@all-day-breakfast.com> |
---|---|
date | Wed, 30 Oct 2019 11:28:45 +0000 |
parents | 59a8758c56b1 |
children |
line wrap: on
line source
#include "portaudiocpp/InterfaceCallbackStream.hxx" #include "portaudiocpp/StreamParameters.hxx" #include "portaudiocpp/Exception.hxx" #include "portaudiocpp/CallbackInterface.hxx" namespace portaudio { // ---------------------------------------------------------------------------------== InterfaceCallbackStream::InterfaceCallbackStream() { } InterfaceCallbackStream::InterfaceCallbackStream(const StreamParameters ¶meters, CallbackInterface &instance) { open(parameters, instance); } InterfaceCallbackStream::~InterfaceCallbackStream() { try { close(); } catch (...) { // ignore all errors } } // ---------------------------------------------------------------------------------== void InterfaceCallbackStream::open(const StreamParameters ¶meters, CallbackInterface &instance) { PaError err = Pa_OpenStream(&stream_, parameters.inputParameters().paStreamParameters(), parameters.outputParameters().paStreamParameters(), parameters.sampleRate(), parameters.framesPerBuffer(), parameters.flags(), &impl::callbackInterfaceToPaCallbackAdapter, static_cast<void *>(&instance)); if (err != paNoError) { throw PaException(err); } } }