live update
This commit is contained in:
@@ -1,9 +1,49 @@
|
||||
#include "ApplicationData.h"
|
||||
|
||||
AudioDevice::AudioDevice()
|
||||
{
|
||||
}
|
||||
|
||||
AudioDevice::AudioDevice(AudioDevice&& other) noexcept
|
||||
: device(other.device), volumeInterface(other.volumeInterface), meterInterface(other.meterInterface),
|
||||
id(other.id), name(other.name), state(other.state),
|
||||
isDefaultConsole(other.isDefaultConsole), isDefaultMedia(other.isDefaultMedia), isDefaultCommunication(other.isDefaultCommunication)
|
||||
{
|
||||
other.device = nullptr;
|
||||
other.volumeInterface = nullptr;
|
||||
other.meterInterface = nullptr;
|
||||
}
|
||||
|
||||
AudioDevice& AudioDevice::operator=(AudioDevice&& other) noexcept
|
||||
{
|
||||
this->device = other.device;
|
||||
this->volumeInterface = other.volumeInterface;
|
||||
this->meterInterface = other.meterInterface;
|
||||
this->id = other.id;
|
||||
this->name = other.name;
|
||||
this->state = other.state;
|
||||
this->isDefaultConsole = other.isDefaultConsole;
|
||||
this->isDefaultMedia = other.isDefaultMedia;
|
||||
this->isDefaultCommunication = other.isDefaultCommunication;
|
||||
|
||||
other.device = nullptr;
|
||||
other.volumeInterface = nullptr;
|
||||
other.meterInterface = nullptr;
|
||||
return *this;
|
||||
}
|
||||
|
||||
AudioDevice::~AudioDevice()
|
||||
{
|
||||
if (volumeInterface)
|
||||
{
|
||||
volumeInterface->Release();
|
||||
}
|
||||
if (meterInterface)
|
||||
{
|
||||
meterInterface->Release();
|
||||
}
|
||||
if (device)
|
||||
{
|
||||
//device->Release();
|
||||
device->Release();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user