More work. Audio driver works enough to play music now.

This commit is contained in:
elasota
2019-12-11 00:51:42 -05:00
parent b1e8e11a56
commit e368cf7235
141 changed files with 8996 additions and 1117 deletions

42
GpD3D/GpMutex_Win32.cpp Normal file
View File

@@ -0,0 +1,42 @@
#include "GpMutex_Win32.h"
#include "GpWindows.h"
#include <stdlib.h>
#include <new>
void GpMutex_Win32::Destroy()
{
this->~GpMutex_Win32();
free(this);
}
void GpMutex_Win32::Lock()
{
EnterCriticalSection(&m_critSection);
}
void GpMutex_Win32::Unlock()
{
LeaveCriticalSection(&m_critSection);
}
GpMutex_Win32 *GpMutex_Win32::Create()
{
void *storage = malloc(sizeof(GpMutex_Win32));
if (!storage)
return nullptr;
return new (storage) GpMutex_Win32();
}
GpMutex_Win32::GpMutex_Win32()
{
InitializeCriticalSection(&m_critSection);
}
GpMutex_Win32::~GpMutex_Win32()
{
DeleteCriticalSection(&m_critSection);
}