diff --git a/lib/soapy/soapy_sink_c.cc b/lib/soapy/soapy_sink_c.cc index 80a5c54..9c9b0db 100644 --- a/lib/soapy/soapy_sink_c.cc +++ b/lib/soapy/soapy_sink_c.cc @@ -84,30 +84,12 @@ soapy_sink_c::~soapy_sink_c(void) bool soapy_sink_c::start() { - try - { - _device->activateStream(_stream); - } - catch (const std::exception &ex) - { - std::cerr << "soapy_sink_c::start(): " << ex.what() << std::endl; - return false; - } - return true; + return _device->activateStream(_stream) == 0; } bool soapy_sink_c::stop() { - try - { - _device->deactivateStream(_stream); - } - catch (const std::exception &ex) - { - std::cerr << "soapy_sink_c::stop(): " << ex.what() << std::endl; - return false; - } - return true; + return _device->deactivateStream(_stream) == 0; } int soapy_sink_c::work( int noutput_items, diff --git a/lib/soapy/soapy_source_c.cc b/lib/soapy/soapy_source_c.cc index 330173b..08ef3ab 100644 --- a/lib/soapy/soapy_source_c.cc +++ b/lib/soapy/soapy_source_c.cc @@ -81,30 +81,12 @@ soapy_source_c::~soapy_source_c(void) bool soapy_source_c::start() { - try - { - _device->activateStream(_stream); - } - catch (const std::exception &ex) - { - std::cerr << "soapy_source_c::start(): " << ex.what() << std::endl; - return false; - } - return true; + return _device->activateStream(_stream) == 0; } bool soapy_source_c::stop() { - try - { - _device->deactivateStream(_stream); - } - catch (const std::exception &ex) - { - std::cerr << "soapy_source_c::stop(): " << ex.what() << std::endl; - return false; - } - return true; + return _device->deactivateStream(_stream) == 0; } int soapy_source_c::work( int noutput_items,