From: <man...@us...> - 2014-11-03 18:04:05
|
Revision: 4543 http://sourceforge.net/p/modplug/code/4543 Author: manxorist Date: 2014-11-03 18:03:46 +0000 (Mon, 03 Nov 2014) Log Message: ----------- [Ref] sounddev: Remove superfluous functions from SoundDevice::IBase. Modified Paths: -------------- trunk/OpenMPT/mptrack/MainFrm.cpp trunk/OpenMPT/sounddev/SoundDevice.cpp trunk/OpenMPT/sounddev/SoundDevice.h Modified: trunk/OpenMPT/mptrack/MainFrm.cpp =================================================================== --- trunk/OpenMPT/mptrack/MainFrm.cpp 2014-11-03 17:39:54 UTC (rev 4542) +++ trunk/OpenMPT/mptrack/MainFrm.cpp 2014-11-03 18:03:46 UTC (rev 4543) @@ -767,7 +767,7 @@ return false; } const SoundDevice::Identifier deviceIdentifier = TrackerSettings::Instance().GetSoundDeviceIdentifier(); - if(gpSoundDevice && (gpSoundDevice->GetDeviceIdentifier() != deviceIdentifier)) + if(gpSoundDevice && (gpSoundDevice->GetDeviceInfo().GetIdentifier() != deviceIdentifier)) { gpSoundDevice->Stop(); gpSoundDevice->Close(); Modified: trunk/OpenMPT/sounddev/SoundDevice.cpp =================================================================== --- trunk/OpenMPT/sounddev/SoundDevice.cpp 2014-11-03 17:39:54 UTC (rev 4542) +++ trunk/OpenMPT/sounddev/SoundDevice.cpp 2014-11-03 18:03:46 UTC (rev 4543) @@ -628,7 +628,7 @@ //---------------------------------------------------------------------------------------------------------------------------------------------------------- { bool result = false; - if(currentSoundDevice && FindDeviceInfo(identifier).IsValid() && (currentSoundDevice->GetDeviceIdentifier() == identifier)) + if(currentSoundDevice && FindDeviceInfo(identifier).IsValid() && (currentSoundDevice->GetDeviceInfo().GetIdentifier() == identifier)) { result = currentSoundDevice->OpenDriverSettings(); } else @@ -650,7 +650,7 @@ { if(m_DeviceCaps.find(identifier) == m_DeviceCaps.end()) { - if(currentSoundDevice && FindDeviceInfo(identifier).IsValid() && (currentSoundDevice->GetDeviceIdentifier() == identifier)) + if(currentSoundDevice && FindDeviceInfo(identifier).IsValid() && (currentSoundDevice->GetDeviceInfo().GetIdentifier() == identifier)) { m_DeviceCaps[identifier] = currentSoundDevice->GetDeviceCaps(); } else @@ -675,7 +675,7 @@ { if((m_DeviceDynamicCaps.find(identifier) == m_DeviceDynamicCaps.end()) || update) { - if(currentSoundDevice && FindDeviceInfo(identifier).IsValid() && (currentSoundDevice->GetDeviceIdentifier() == identifier)) + if(currentSoundDevice && FindDeviceInfo(identifier).IsValid() && (currentSoundDevice->GetDeviceInfo().GetIdentifier() == identifier)) { m_DeviceDynamicCaps[identifier] = currentSoundDevice->GetDeviceDynamicCaps(baseSampleRates); if(!currentSoundDevice->IsAvailable()) Modified: trunk/OpenMPT/sounddev/SoundDevice.h =================================================================== --- trunk/OpenMPT/sounddev/SoundDevice.h 2014-11-03 17:39:54 UTC (rev 4542) +++ trunk/OpenMPT/sounddev/SoundDevice.h 2014-11-03 18:03:46 UTC (rev 4543) @@ -474,11 +474,6 @@ virtual SoundDevice::IMessageReceiver *GetMessageReceiver() const = 0; virtual SoundDevice::Info GetDeviceInfo() const = 0; - virtual SoundDevice::ID GetDeviceID() const = 0; - virtual SoundDevice::Type GetDeviceType() const = 0; - virtual SoundDevice::Index GetDeviceIndex() const = 0; - virtual std::wstring GetDeviceInternalID() const = 0; - virtual SoundDevice::Identifier GetDeviceIdentifier() const = 0; virtual SoundDevice::Caps GetDeviceCaps() const = 0; virtual SoundDevice::DynamicCaps GetDeviceDynamicCaps(const std::vector<uint32> &baseSampleRates) = 0; @@ -559,6 +554,12 @@ protected: + SoundDevice::ID GetDeviceID() const { return m_Info.id; } + SoundDevice::Type GetDeviceType() const { return m_Info.id.GetType(); } + SoundDevice::Index GetDeviceIndex() const { return m_Info.id.GetIndex(); } + std::wstring GetDeviceInternalID() const { return m_Info.internalID; } + SoundDevice::Identifier GetDeviceIdentifier() const { return m_Info.GetIdentifier(); } + virtual void InternalFillAudioBuffer() = 0; void FillAudioBuffer(); @@ -610,11 +611,6 @@ SoundDevice::IMessageReceiver *GetMessageReceiver() const { return m_MessageReceiver; } SoundDevice::Info GetDeviceInfo() const { return m_Info; } - SoundDevice::ID GetDeviceID() const { return m_Info.id; } - SoundDevice::Type GetDeviceType() const { return m_Info.id.GetType(); } - SoundDevice::Index GetDeviceIndex() const { return m_Info.id.GetIndex(); } - std::wstring GetDeviceInternalID() const { return m_Info.internalID; } - SoundDevice::Identifier GetDeviceIdentifier() const { return m_Info.GetIdentifier(); } SoundDevice::Caps GetDeviceCaps() const { return m_Caps; } virtual SoundDevice::DynamicCaps GetDeviceDynamicCaps(const std::vector<uint32> &baseSampleRates); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |