Ref T730, stop input/output if object is destroyed

This commit is contained in:
Klaus Basan
2019-09-28 00:44:32 +02:00
committed by Mat Sutcliffe
parent 5eb3dee829
commit e560be65a6
3 changed files with 15 additions and 4 deletions

View File

@@ -32,6 +32,7 @@ namespace BlackCore
double PeakVU = 0.0;
};
//! Output buffer
class CAudioOutputBuffer : public QIODevice
{
Q_OBJECT
@@ -71,6 +72,12 @@ namespace BlackCore
//! Ctor
Output(QObject *parent = nullptr);
//! Dtor
virtual ~Output() override
{
this->stop();
}
//! Start output
void start(const QAudioDeviceInfo &outputDevice, BlackSound::SampleProvider::ISampleProvider *sampleProvider);