soapy: start/stop hooks should use de/activate return code
This commit is contained in:
parent
cd0d9350c6
commit
a960600a1e
|
@ -84,30 +84,12 @@ soapy_sink_c::~soapy_sink_c(void)
|
||||||
|
|
||||||
bool soapy_sink_c::start()
|
bool soapy_sink_c::start()
|
||||||
{
|
{
|
||||||
try
|
return _device->activateStream(_stream) == 0;
|
||||||
{
|
|
||||||
_device->activateStream(_stream);
|
|
||||||
}
|
|
||||||
catch (const std::exception &ex)
|
|
||||||
{
|
|
||||||
std::cerr << "soapy_sink_c::start(): " << ex.what() << std::endl;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool soapy_sink_c::stop()
|
bool soapy_sink_c::stop()
|
||||||
{
|
{
|
||||||
try
|
return _device->deactivateStream(_stream) == 0;
|
||||||
{
|
|
||||||
_device->deactivateStream(_stream);
|
|
||||||
}
|
|
||||||
catch (const std::exception &ex)
|
|
||||||
{
|
|
||||||
std::cerr << "soapy_sink_c::stop(): " << ex.what() << std::endl;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int soapy_sink_c::work( int noutput_items,
|
int soapy_sink_c::work( int noutput_items,
|
||||||
|
|
|
@ -81,30 +81,12 @@ soapy_source_c::~soapy_source_c(void)
|
||||||
|
|
||||||
bool soapy_source_c::start()
|
bool soapy_source_c::start()
|
||||||
{
|
{
|
||||||
try
|
return _device->activateStream(_stream) == 0;
|
||||||
{
|
|
||||||
_device->activateStream(_stream);
|
|
||||||
}
|
|
||||||
catch (const std::exception &ex)
|
|
||||||
{
|
|
||||||
std::cerr << "soapy_source_c::start(): " << ex.what() << std::endl;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool soapy_source_c::stop()
|
bool soapy_source_c::stop()
|
||||||
{
|
{
|
||||||
try
|
return _device->deactivateStream(_stream) == 0;
|
||||||
{
|
|
||||||
_device->deactivateStream(_stream);
|
|
||||||
}
|
|
||||||
catch (const std::exception &ex)
|
|
||||||
{
|
|
||||||
std::cerr << "soapy_source_c::stop(): " << ex.what() << std::endl;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int soapy_source_c::work( int noutput_items,
|
int soapy_source_c::work( int noutput_items,
|
||||||
|
|
Loading…
Reference in New Issue