mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-12-16 04:50:32 +00:00
More work. Audio driver works enough to play music now.
This commit is contained in:
@@ -1,50 +1,52 @@
|
||||
#pragma once
|
||||
|
||||
#include "GpWindows.h"
|
||||
#include "GpRingBuffer.h"
|
||||
|
||||
#include "IGpDisplayDriver.h"
|
||||
#include "GpCoreDefs.h"
|
||||
#include "GpDisplayDriverProperties.h"
|
||||
|
||||
struct IDXGISwapChain1;
|
||||
|
||||
class GpDisplayDriverD3D11 : public IGpDisplayDriver
|
||||
{
|
||||
public:
|
||||
void Run() override;
|
||||
void Shutdown() override;
|
||||
|
||||
void GetDisplayResolution(unsigned int &width, unsigned int &height) override;
|
||||
|
||||
static GpDisplayDriverD3D11 *Create(const GpDisplayDriverProperties &properties);
|
||||
|
||||
private:
|
||||
GpDisplayDriverD3D11(const GpDisplayDriverProperties &properties);
|
||||
|
||||
bool PresentFrameAndSync();
|
||||
|
||||
IDXGISwapChain1 *m_SwapChain;
|
||||
|
||||
struct CompactedPresentHistoryItem
|
||||
{
|
||||
LARGE_INTEGER m_Timestamp;
|
||||
unsigned int m_NumFrames;
|
||||
};
|
||||
|
||||
GpRingBuffer<CompactedPresentHistoryItem, 60> m_PresentHistory;
|
||||
GpDisplayDriverProperties m_Properties;
|
||||
|
||||
LARGE_INTEGER m_SyncTimeBase;
|
||||
LARGE_INTEGER m_QPFrequency;
|
||||
UINT m_ExpectedSyncDelta;
|
||||
bool m_IsResettingSwapChain;
|
||||
|
||||
LONGLONG m_FrameTimeAccumulated;
|
||||
LONGLONG m_FrameTimeSliceSize;
|
||||
|
||||
DWORD m_windowWidth;
|
||||
DWORD m_windowHeight;
|
||||
|
||||
GpFiber *m_vosFiber;
|
||||
};
|
||||
#pragma once
|
||||
|
||||
#include "GpWindows.h"
|
||||
#include "GpRingBuffer.h"
|
||||
|
||||
#include "IGpDisplayDriver.h"
|
||||
#include "GpCoreDefs.h"
|
||||
#include "GpDisplayDriverProperties.h"
|
||||
|
||||
#include "PixelFormat.h"
|
||||
|
||||
struct IDXGISwapChain1;
|
||||
|
||||
class GpDisplayDriverD3D11 : public IGpDisplayDriver
|
||||
{
|
||||
public:
|
||||
void Run() override;
|
||||
void Shutdown() override;
|
||||
|
||||
void GetDisplayResolution(unsigned int *width, unsigned int *height, PortabilityLayer::PixelFormat *bpp) override;
|
||||
|
||||
static GpDisplayDriverD3D11 *Create(const GpDisplayDriverProperties &properties);
|
||||
|
||||
private:
|
||||
GpDisplayDriverD3D11(const GpDisplayDriverProperties &properties);
|
||||
|
||||
bool PresentFrameAndSync();
|
||||
|
||||
IDXGISwapChain1 *m_swapChain;
|
||||
|
||||
struct CompactedPresentHistoryItem
|
||||
{
|
||||
LARGE_INTEGER m_timestamp;
|
||||
unsigned int m_numFrames;
|
||||
};
|
||||
|
||||
GpRingBuffer<CompactedPresentHistoryItem, 60> m_presentHistory;
|
||||
GpDisplayDriverProperties m_properties;
|
||||
|
||||
LARGE_INTEGER m_syncTimeBase;
|
||||
LARGE_INTEGER m_QPFrequency;
|
||||
UINT m_expectedSyncDelta;
|
||||
bool m_isResettingSwapChain;
|
||||
|
||||
LONGLONG m_frameTimeAccumulated;
|
||||
LONGLONG m_frameTimeSliceSize;
|
||||
|
||||
DWORD m_windowWidth;
|
||||
DWORD m_windowHeight;
|
||||
|
||||
GpFiber *m_vosFiber;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user