From c112738f2edddae49a185710f74db65359ee487c Mon Sep 17 00:00:00 2001 From: elasota Date: Mon, 20 Jan 2020 05:14:35 -0500 Subject: [PATCH] Remove glue drivers, use Gp drivers instead --- Aerofoil/Aerofoil.vcxproj | 6 --- Aerofoil/GpAppEnvironment.cpp | 9 +--- Aerofoil/GpPLGlueAudioChannel.cpp | 54 ------------------- Aerofoil/GpPLGlueAudioChannel.h | 26 --------- Aerofoil/GpPLGlueAudioDriver.cpp | 43 --------------- Aerofoil/GpPLGlueAudioDriver.h | 23 -------- Aerofoil/GpPLGlueDisplayDriver.cpp | 40 -------------- Aerofoil/GpPLGlueDisplayDriver.h | 25 --------- GpApp/AnimCursor.cpp | 1 + GpApp/Environ.cpp | 1 + GpApp/GpAppInterface.cpp | 8 +-- PortabilityLayer/ClientAudioChannelContext.h | 12 ----- PortabilityLayer/DialogManager.cpp | 1 + PortabilityLayer/GpAppInterface.h | 8 +-- PortabilityLayer/HostAudioChannel.h | 15 ------ PortabilityLayer/HostAudioDriver.cpp | 6 +-- PortabilityLayer/HostAudioDriver.h | 13 ++--- PortabilityLayer/HostDisplayDriver.cpp | 6 +-- PortabilityLayer/HostDisplayDriver.h | 12 ++--- PortabilityLayer/PLCore.cpp | 1 + PortabilityLayer/PLSound.cpp | 19 +++---- PortabilityLayer/PortabilityLayer.vcxproj | 2 - .../PortabilityLayer.vcxproj.filters | 6 --- 23 files changed, 39 insertions(+), 298 deletions(-) delete mode 100644 Aerofoil/GpPLGlueAudioChannel.cpp delete mode 100644 Aerofoil/GpPLGlueAudioChannel.h delete mode 100644 Aerofoil/GpPLGlueAudioDriver.cpp delete mode 100644 Aerofoil/GpPLGlueAudioDriver.h delete mode 100644 Aerofoil/GpPLGlueDisplayDriver.cpp delete mode 100644 Aerofoil/GpPLGlueDisplayDriver.h delete mode 100644 PortabilityLayer/ClientAudioChannelContext.h delete mode 100644 PortabilityLayer/HostAudioChannel.h diff --git a/Aerofoil/Aerofoil.vcxproj b/Aerofoil/Aerofoil.vcxproj index f3180f0..f91463d 100644 --- a/Aerofoil/Aerofoil.vcxproj +++ b/Aerofoil/Aerofoil.vcxproj @@ -158,9 +158,6 @@ - - - @@ -193,9 +190,6 @@ - - - diff --git a/Aerofoil/GpAppEnvironment.cpp b/Aerofoil/GpAppEnvironment.cpp index 66d1d43..07a1d6e 100644 --- a/Aerofoil/GpAppEnvironment.cpp +++ b/Aerofoil/GpAppEnvironment.cpp @@ -3,8 +3,6 @@ #include "GpAppInterface.h" #include "GpDisplayDriverTickStatus.h" #include "GpFontHandlerFactory.h" -#include "GpPLGlueAudioDriver.h" -#include "GpPLGlueDisplayDriver.h" #include "HostSuspendCallArgument.h" #include "IGpDisplayDriver.h" #include "IGpFiber.h" @@ -137,15 +135,12 @@ void GpAppEnvironment::AppThreadFunc() void GpAppEnvironment::InitializeApplicationState() { - GpAppInterface_Get()->PL_HostDisplayDriver_SetInstance(GpPLGlueDisplayDriver::GetInstance()); - GpAppInterface_Get()->PL_HostAudioDriver_SetInstance(GpPLGlueAudioDriver::GetInstance()); + GpAppInterface_Get()->PL_HostDisplayDriver_SetInstance(m_displayDriver); + GpAppInterface_Get()->PL_HostAudioDriver_SetInstance(m_audioDriver); GpAppInterface_Get()->PL_InstallHostSuspendHook(GpAppEnvironment::StaticSuspendHookFunc, this); GpAppInterface_Get()->PL_HostFontHandler_SetInstance(m_fontHandler); GpAppInterface_Get()->PL_HostVOSEventQueue_SetInstance(m_vosEventQueue); - - GpPLGlueDisplayDriver::GetInstance()->SetGpDisplayDriver(m_displayDriver); - GpPLGlueAudioDriver::GetInstance()->SetGpAudioDriver(m_audioDriver); } void GpAppEnvironment::SynchronizeState() diff --git a/Aerofoil/GpPLGlueAudioChannel.cpp b/Aerofoil/GpPLGlueAudioChannel.cpp deleted file mode 100644 index 5fb281d..0000000 --- a/Aerofoil/GpPLGlueAudioChannel.cpp +++ /dev/null @@ -1,54 +0,0 @@ -#include "GpPLGlueAudioChannel.h" -#include "ClientAudioChannelContext.h" -#include "IGpAudioChannel.h" - -#include -#include - -void GpPLGlueAudioChannel::SetClientAudioChannelContext(PortabilityLayer::ClientAudioChannelContext *context) -{ - m_clientContext = context; - m_audioChannel->SetAudioChannelContext(this); -} - -void GpPLGlueAudioChannel::PostBuffer(const void *buffer, size_t bufferSize) -{ - m_audioChannel->PostBuffer(buffer, bufferSize); -} - -void GpPLGlueAudioChannel::Stop() -{ - m_audioChannel->Stop(); -} - -void GpPLGlueAudioChannel::Destroy() -{ - this->~GpPLGlueAudioChannel(); - free(this); -} - -void GpPLGlueAudioChannel::NotifyBufferFinished() -{ - if (m_clientContext) - m_clientContext->NotifyBufferFinished(); -} - -GpPLGlueAudioChannel *GpPLGlueAudioChannel::Create(IGpAudioChannel *audioChannel) -{ - void *storage = malloc(sizeof(GpPLGlueAudioChannel)); - if (!storage) - return nullptr; - - return new (storage) GpPLGlueAudioChannel(audioChannel); -} - -GpPLGlueAudioChannel::GpPLGlueAudioChannel(IGpAudioChannel *audioChannel) - : m_audioChannel(audioChannel) - , m_clientContext(nullptr) -{ -} - -GpPLGlueAudioChannel::~GpPLGlueAudioChannel() -{ - m_audioChannel->Destroy(); -} diff --git a/Aerofoil/GpPLGlueAudioChannel.h b/Aerofoil/GpPLGlueAudioChannel.h deleted file mode 100644 index a4780ed..0000000 --- a/Aerofoil/GpPLGlueAudioChannel.h +++ /dev/null @@ -1,26 +0,0 @@ -#pragma once - -#include "HostAudioChannel.h" -#include "IGpAudioChannelCallbacks.h" - -struct IGpAudioChannel; - -class GpPLGlueAudioChannel final : public PortabilityLayer::HostAudioChannel, public IGpAudioChannelCallbacks -{ -public: - void SetClientAudioChannelContext(PortabilityLayer::ClientAudioChannelContext *context) override; - void PostBuffer(const void *buffer, size_t bufferSize) override; - void Stop() override; - void Destroy() override; - - void NotifyBufferFinished() override; - - static GpPLGlueAudioChannel *Create(IGpAudioChannel *audioChannel); - -private: - explicit GpPLGlueAudioChannel(IGpAudioChannel *audioChannel); - ~GpPLGlueAudioChannel(); - - PortabilityLayer::ClientAudioChannelContext *m_clientContext; - IGpAudioChannel *m_audioChannel; -}; diff --git a/Aerofoil/GpPLGlueAudioDriver.cpp b/Aerofoil/GpPLGlueAudioDriver.cpp deleted file mode 100644 index 703c5b2..0000000 --- a/Aerofoil/GpPLGlueAudioDriver.cpp +++ /dev/null @@ -1,43 +0,0 @@ -#include "GpPLGlueAudioDriver.h" - -#include "GpPLGlueAudioChannel.h" -#include "IGpAudioChannel.h" -#include "IGpAudioDriver.h" - -GpPLGlueAudioDriver::GpPLGlueAudioDriver() - : m_audioDriver(nullptr) -{ -} - -PortabilityLayer::HostAudioChannel *GpPLGlueAudioDriver::CreateChannel() -{ - IGpAudioChannel *channel = m_audioDriver->CreateChannel(); - if (!channel) - return nullptr; - - PortabilityLayer::HostAudioChannel *glueChannel = GpPLGlueAudioChannel::Create(channel); - if (!glueChannel) - { - channel->Destroy(); - return nullptr; - } - - return glueChannel; -} - -void GpPLGlueAudioDriver::SetMasterVolume(uint32_t vol, uint32_t maxVolume) -{ - m_audioDriver->SetMasterVolume(vol, maxVolume); -} - -GpPLGlueAudioDriver *GpPLGlueAudioDriver::GetInstance() -{ - return &ms_instance; -} - -void GpPLGlueAudioDriver::SetGpAudioDriver(IGpAudioDriver *audioDriver) -{ - m_audioDriver = audioDriver; -} - -GpPLGlueAudioDriver GpPLGlueAudioDriver::ms_instance; diff --git a/Aerofoil/GpPLGlueAudioDriver.h b/Aerofoil/GpPLGlueAudioDriver.h deleted file mode 100644 index b108c7b..0000000 --- a/Aerofoil/GpPLGlueAudioDriver.h +++ /dev/null @@ -1,23 +0,0 @@ -#pragma once - -#include "HostAudioDriver.h" - -struct IGpAudioDriver; - -class GpPLGlueAudioDriver final : public PortabilityLayer::HostAudioDriver -{ -public: - GpPLGlueAudioDriver(); - - PortabilityLayer::HostAudioChannel *CreateChannel() override; - void SetMasterVolume(uint32_t vol, uint32_t maxVolume) override; - - void SetGpAudioDriver(IGpAudioDriver *audioDriver); - - static GpPLGlueAudioDriver *GetInstance(); - -private: - IGpAudioDriver *m_audioDriver; - - static GpPLGlueAudioDriver ms_instance; -}; diff --git a/Aerofoil/GpPLGlueDisplayDriver.cpp b/Aerofoil/GpPLGlueDisplayDriver.cpp deleted file mode 100644 index 5c3d2a6..0000000 --- a/Aerofoil/GpPLGlueDisplayDriver.cpp +++ /dev/null @@ -1,40 +0,0 @@ -#include "GpPLGlueDisplayDriver.h" -#include "VirtualDirectory.h" -#include "IGpDisplayDriver.h" - -GpPLGlueDisplayDriver::GpPLGlueDisplayDriver() - : m_displayDriver(nullptr) -{ -} - -void GpPLGlueDisplayDriver::GetDisplayResolution(unsigned int *width, unsigned int *height, GpPixelFormat_t *bpp) -{ - m_displayDriver->GetDisplayResolution(width, height, bpp); -} - -IGpColorCursor *GpPLGlueDisplayDriver::LoadColorCursor(int cursorID) -{ - return m_displayDriver->LoadColorCursor(cursorID); -} - -void GpPLGlueDisplayDriver::SetColorCursor(IGpColorCursor *colorCursor) -{ - m_displayDriver->SetColorCursor(colorCursor); -} - -void GpPLGlueDisplayDriver::SetStandardCursor(EGpStandardCursor_t standardCursor) -{ - m_displayDriver->SetStandardCursor(standardCursor); -} - -GpPLGlueDisplayDriver *GpPLGlueDisplayDriver::GetInstance() -{ - return &ms_instance; -} - -void GpPLGlueDisplayDriver::SetGpDisplayDriver(IGpDisplayDriver *displayDriver) -{ - m_displayDriver = displayDriver; -} - -GpPLGlueDisplayDriver GpPLGlueDisplayDriver::ms_instance; diff --git a/Aerofoil/GpPLGlueDisplayDriver.h b/Aerofoil/GpPLGlueDisplayDriver.h deleted file mode 100644 index d958f8b..0000000 --- a/Aerofoil/GpPLGlueDisplayDriver.h +++ /dev/null @@ -1,25 +0,0 @@ -#pragma once - -#include "HostDisplayDriver.h" - -struct IGpDisplayDriver; - -class GpPLGlueDisplayDriver final : public PortabilityLayer::HostDisplayDriver -{ -public: - GpPLGlueDisplayDriver(); - - void GetDisplayResolution(unsigned int *width, unsigned int *height, GpPixelFormat_t *bpp) override; - IGpColorCursor *LoadColorCursor(int id) override; - void SetColorCursor(IGpColorCursor *colorCursor) override; - void SetStandardCursor(EGpStandardCursor_t standardCursor) override; - - void SetGpDisplayDriver(IGpDisplayDriver *displayDriver); - - static GpPLGlueDisplayDriver *GetInstance(); - -private: - IGpDisplayDriver *m_displayDriver; - - static GpPLGlueDisplayDriver ms_instance; -}; diff --git a/GpApp/AnimCursor.cpp b/GpApp/AnimCursor.cpp index a4be2e1..e3d5840 100644 --- a/GpApp/AnimCursor.cpp +++ b/GpApp/AnimCursor.cpp @@ -12,6 +12,7 @@ #include "Environ.h" #include "HostDisplayDriver.h" #include "IGpColorCursor.h" +#include "IGpDisplayDriver.h" #define rAcurID 128 diff --git a/GpApp/Environ.cpp b/GpApp/Environ.cpp index 8cc8965..467e512 100644 --- a/GpApp/Environ.cpp +++ b/GpApp/Environ.cpp @@ -12,6 +12,7 @@ #include "Environ.h" #include "HostDisplayDriver.h" #include "HostSystemServices.h" +#include "IGpDisplayDriver.h" #define kSwitchDepthAlert 130 diff --git a/GpApp/GpAppInterface.cpp b/GpApp/GpAppInterface.cpp index 34ea0ca..f977a8e 100644 --- a/GpApp/GpAppInterface.cpp +++ b/GpApp/GpAppInterface.cpp @@ -19,9 +19,9 @@ public: void PL_IncrementTickCounter(uint32_t count) override; void PL_Render(IGpDisplayDriver *displayDriver) override; void PL_HostFileSystem_SetInstance(PortabilityLayer::HostFileSystem *instance) override; - void PL_HostDisplayDriver_SetInstance(PortabilityLayer::HostDisplayDriver *instance) override; + void PL_HostDisplayDriver_SetInstance(IGpDisplayDriver *instance) override; void PL_HostSystemServices_SetInstance(PortabilityLayer::HostSystemServices *instance) override; - void PL_HostAudioDriver_SetInstance(PortabilityLayer::HostAudioDriver *instance) override; + void PL_HostAudioDriver_SetInstance(IGpAudioDriver *instance) override; void PL_HostFontHandler_SetInstance(PortabilityLayer::HostFontHandler *instance) override; void PL_HostVOSEventQueue_SetInstance(PortabilityLayer::HostVOSEventQueue *instance) override; void PL_InstallHostSuspendHook(PortabilityLayer::HostSuspendHook_t hook, void *context) override; @@ -49,7 +49,7 @@ void GpAppInterfaceImpl::PL_HostFileSystem_SetInstance(PortabilityLayer::HostFil PortabilityLayer::HostFileSystem::SetInstance(instance); } -void GpAppInterfaceImpl::PL_HostDisplayDriver_SetInstance(PortabilityLayer::HostDisplayDriver *instance) +void GpAppInterfaceImpl::PL_HostDisplayDriver_SetInstance(IGpDisplayDriver *instance) { PortabilityLayer::HostDisplayDriver::SetInstance(instance); } @@ -59,7 +59,7 @@ void GpAppInterfaceImpl::PL_HostSystemServices_SetInstance(PortabilityLayer::Hos PortabilityLayer::HostSystemServices::SetInstance(instance); } -void GpAppInterfaceImpl::PL_HostAudioDriver_SetInstance(PortabilityLayer::HostAudioDriver *instance) +void GpAppInterfaceImpl::PL_HostAudioDriver_SetInstance(IGpAudioDriver *instance) { PortabilityLayer::HostAudioDriver::SetInstance(instance); } diff --git a/PortabilityLayer/ClientAudioChannelContext.h b/PortabilityLayer/ClientAudioChannelContext.h deleted file mode 100644 index 22d39fe..0000000 --- a/PortabilityLayer/ClientAudioChannelContext.h +++ /dev/null @@ -1,12 +0,0 @@ -#pragma once - -#include - -namespace PortabilityLayer -{ - class ClientAudioChannelContext - { - public: - virtual void NotifyBufferFinished() = 0; - }; -} diff --git a/PortabilityLayer/DialogManager.cpp b/PortabilityLayer/DialogManager.cpp index b9485c0..d07d6df 100644 --- a/PortabilityLayer/DialogManager.cpp +++ b/PortabilityLayer/DialogManager.cpp @@ -1,6 +1,7 @@ #include "DialogManager.h" #include "HostDisplayDriver.h" #include "IconLoader.h" +#include "IGpDisplayDriver.h" #include "ResourceManager.h" #include "PLArrayView.h" #include "PLBigEndian.h" diff --git a/PortabilityLayer/GpAppInterface.h b/PortabilityLayer/GpAppInterface.h index e2096e4..f00c2ec 100644 --- a/PortabilityLayer/GpAppInterface.h +++ b/PortabilityLayer/GpAppInterface.h @@ -19,9 +19,10 @@ #endif +struct IGpAudioDriver; + namespace PortabilityLayer { - class HostAudioDriver; class HostFileSystem; class HostDisplayDriver; class HostSystemServices; @@ -38,12 +39,13 @@ public: virtual void PL_IncrementTickCounter(uint32_t count) = 0; virtual void PL_Render(IGpDisplayDriver *displayDriver) = 0; virtual void PL_HostFileSystem_SetInstance(PortabilityLayer::HostFileSystem *instance) = 0; - virtual void PL_HostDisplayDriver_SetInstance(PortabilityLayer::HostDisplayDriver *instance) = 0; + virtual void PL_HostDisplayDriver_SetInstance(IGpDisplayDriver *instance) = 0; virtual void PL_HostSystemServices_SetInstance(PortabilityLayer::HostSystemServices *instance) = 0; - virtual void PL_HostAudioDriver_SetInstance(PortabilityLayer::HostAudioDriver *instance) = 0; virtual void PL_HostFontHandler_SetInstance(PortabilityLayer::HostFontHandler *instance) = 0; virtual void PL_HostVOSEventQueue_SetInstance(PortabilityLayer::HostVOSEventQueue *instance) = 0; virtual void PL_InstallHostSuspendHook(PortabilityLayer::HostSuspendHook_t hook, void *context) = 0; + + virtual void PL_HostAudioDriver_SetInstance(IGpAudioDriver *instance) = 0; }; GP_APP_DLL_EXPORT_API GpAppInterface *GpAppInterface_Get(); diff --git a/PortabilityLayer/HostAudioChannel.h b/PortabilityLayer/HostAudioChannel.h deleted file mode 100644 index 4dbfb4d..0000000 --- a/PortabilityLayer/HostAudioChannel.h +++ /dev/null @@ -1,15 +0,0 @@ -#pragma once - -namespace PortabilityLayer -{ - class ClientAudioChannelContext; - - class HostAudioChannel - { - public: - virtual void SetClientAudioChannelContext(ClientAudioChannelContext *context) = 0; - virtual void PostBuffer(const void *buffer, size_t bufferSize) = 0; - virtual void Stop() = 0; - virtual void Destroy() = 0; - }; -} diff --git a/PortabilityLayer/HostAudioDriver.cpp b/PortabilityLayer/HostAudioDriver.cpp index fb95518..bbb0cca 100644 --- a/PortabilityLayer/HostAudioDriver.cpp +++ b/PortabilityLayer/HostAudioDriver.cpp @@ -2,15 +2,15 @@ namespace PortabilityLayer { - HostAudioDriver *HostAudioDriver::GetInstance() + IGpAudioDriver *HostAudioDriver::GetInstance() { return ms_instance; } - void HostAudioDriver::SetInstance(HostAudioDriver *instance) + void HostAudioDriver::SetInstance(IGpAudioDriver *instance) { ms_instance = instance; } - HostAudioDriver *HostAudioDriver::ms_instance; + IGpAudioDriver *HostAudioDriver::ms_instance; } diff --git a/PortabilityLayer/HostAudioDriver.h b/PortabilityLayer/HostAudioDriver.h index b93a3b4..9ffc1d3 100644 --- a/PortabilityLayer/HostAudioDriver.h +++ b/PortabilityLayer/HostAudioDriver.h @@ -1,21 +1,16 @@ #pragma once -#include +struct IGpAudioDriver; namespace PortabilityLayer { - class HostAudioChannel; - class HostAudioDriver { public: - virtual HostAudioChannel *CreateChannel() = 0; - virtual void SetMasterVolume(uint32_t vol, uint32_t maxVolume) = 0; - - static HostAudioDriver *GetInstance(); - static void SetInstance(HostAudioDriver *instance); + static IGpAudioDriver *GetInstance(); + static void SetInstance(IGpAudioDriver *instance); private: - static HostAudioDriver *ms_instance; + static IGpAudioDriver *ms_instance; }; } diff --git a/PortabilityLayer/HostDisplayDriver.cpp b/PortabilityLayer/HostDisplayDriver.cpp index 4dab6c2..d704279 100644 --- a/PortabilityLayer/HostDisplayDriver.cpp +++ b/PortabilityLayer/HostDisplayDriver.cpp @@ -2,15 +2,15 @@ namespace PortabilityLayer { - HostDisplayDriver *HostDisplayDriver::GetInstance() + IGpDisplayDriver *HostDisplayDriver::GetInstance() { return ms_instance; } - void HostDisplayDriver::SetInstance(HostDisplayDriver *instance) + void HostDisplayDriver::SetInstance(IGpDisplayDriver *instance) { ms_instance = instance; } - HostDisplayDriver *HostDisplayDriver::ms_instance; + IGpDisplayDriver *HostDisplayDriver::ms_instance; } diff --git a/PortabilityLayer/HostDisplayDriver.h b/PortabilityLayer/HostDisplayDriver.h index b0b2c11..518a7a1 100644 --- a/PortabilityLayer/HostDisplayDriver.h +++ b/PortabilityLayer/HostDisplayDriver.h @@ -6,22 +6,18 @@ #include "EGpStandardCursor.h" struct IGpColorCursor; +struct IGpDisplayDriver; namespace PortabilityLayer { class HostDisplayDriver { public: - virtual void GetDisplayResolution(unsigned int *width, unsigned int *height, GpPixelFormat_t *pixelFormat) = 0; - virtual IGpColorCursor *LoadColorCursor(int id) = 0; - virtual void SetColorCursor(IGpColorCursor *colorCursor) = 0; - virtual void SetStandardCursor(EGpStandardCursor_t standardCursor) = 0; - - static void SetInstance(HostDisplayDriver *instance); - static HostDisplayDriver *GetInstance(); + static void SetInstance(IGpDisplayDriver *instance); + static IGpDisplayDriver *GetInstance(); private: - static HostDisplayDriver *ms_instance; + static IGpDisplayDriver *ms_instance; }; } diff --git a/PortabilityLayer/PLCore.cpp b/PortabilityLayer/PLCore.cpp index 9f9350e..a099211 100644 --- a/PortabilityLayer/PLCore.cpp +++ b/PortabilityLayer/PLCore.cpp @@ -19,6 +19,7 @@ #include "HostSystemServices.h" #include "HostVOSEventQueue.h" #include "IGpColorCursor.h" +#include "IGpDisplayDriver.h" #include "InputManager.h" #include "ResourceManager.h" #include "MacFileInfo.h" diff --git a/PortabilityLayer/PLSound.cpp b/PortabilityLayer/PLSound.cpp index 2f86013..492cab8 100644 --- a/PortabilityLayer/PLSound.cpp +++ b/PortabilityLayer/PLSound.cpp @@ -1,12 +1,13 @@ #include "PLSound.h" -#include "ClientAudioChannelContext.h" -#include "HostAudioChannel.h" #include "HostAudioDriver.h" #include "MemoryManager.h" #include "HostMutex.h" #include "HostSystemServices.h" #include "HostThreadEvent.h" +#include "IGpAudioChannel.h" +#include "IGpAudioChannelCallbacks.h" +#include "IGpAudioDriver.h" #include "WaveFormat.h" #include @@ -36,10 +37,10 @@ namespace PortabilityLayer AudioCommandParam m_param; }; - class AudioChannelImpl final : public AudioChannel, public ClientAudioChannelContext + class AudioChannelImpl final : public AudioChannel, public IGpAudioChannelCallbacks { public: - explicit AudioChannelImpl(PortabilityLayer::HostAudioChannel *channel, HostThreadEvent *threadEvent, HostMutex *mutex); + explicit AudioChannelImpl(IGpAudioChannel *channel, HostThreadEvent *threadEvent, HostMutex *mutex); ~AudioChannelImpl(); void Destroy(bool wait) override; @@ -70,7 +71,7 @@ namespace PortabilityLayer void DigestQueueItems(); void DigestBufferCommand(const void *dataPointer); - PortabilityLayer::HostAudioChannel *m_audioChannel; + IGpAudioChannel *m_audioChannel; HostMutex *m_mutex; HostThreadEvent *m_threadEvent; @@ -83,7 +84,7 @@ namespace PortabilityLayer bool m_isIdle; }; - AudioChannelImpl::AudioChannelImpl(PortabilityLayer::HostAudioChannel *channel, HostThreadEvent *threadEvent, HostMutex *mutex) + AudioChannelImpl::AudioChannelImpl(IGpAudioChannel *channel, HostThreadEvent *threadEvent, HostMutex *mutex) : m_audioChannel(channel) , m_threadEvent(threadEvent) , m_mutex(mutex) @@ -93,7 +94,7 @@ namespace PortabilityLayer , m_state(State_Idle) , m_isIdle(false) { - m_audioChannel->SetClientAudioChannelContext(this); + m_audioChannel->SetAudioChannelContext(this); } AudioChannelImpl::~AudioChannelImpl() @@ -357,8 +358,8 @@ namespace PortabilityLayer if (!storage) return nullptr; - PortabilityLayer::HostAudioDriver *audioDriver = PortabilityLayer::HostAudioDriver::GetInstance(); - PortabilityLayer::HostAudioChannel *audioChannel = audioDriver->CreateChannel(); + IGpAudioDriver *audioDriver = PortabilityLayer::HostAudioDriver::GetInstance(); + IGpAudioChannel *audioChannel = audioDriver->CreateChannel(); if (!audioChannel) { mm->Release(storage); diff --git a/PortabilityLayer/PortabilityLayer.vcxproj b/PortabilityLayer/PortabilityLayer.vcxproj index 13b03dc..6326259 100644 --- a/PortabilityLayer/PortabilityLayer.vcxproj +++ b/PortabilityLayer/PortabilityLayer.vcxproj @@ -147,7 +147,6 @@ - @@ -161,7 +160,6 @@ - diff --git a/PortabilityLayer/PortabilityLayer.vcxproj.filters b/PortabilityLayer/PortabilityLayer.vcxproj.filters index 5188a66..03f9620 100644 --- a/PortabilityLayer/PortabilityLayer.vcxproj.filters +++ b/PortabilityLayer/PortabilityLayer.vcxproj.filters @@ -285,15 +285,9 @@ Header Files - - Header Files - Header Files - - Header Files - Header Files