1:1 source port of the engine and game code; Windows build and system layer; docs. No game files or SDK headers.

This commit is contained in:
CRTkafa 2026-10-22 16:30:40 +08:00
parent c3b032a45a
commit 0ecb47e9cb
3871 changed files with 91080 additions and 1640063 deletions

35
port/external/openal/CAGuard.h vendored Normal file
View file

@ -0,0 +1,35 @@
// Port of pflib/external/openal/CAGuard.h (Apple Core Audio utility class, Playground SDK 4.0): CAGuard, a CAMutex
// with a condition variable for signalling; Wait / WaitFor / WaitUntil require the calling thread to own the
// guard, release the ownership while waiting and take it back afterwards. CAGuard.cpp is ported next to this file.
// Layout from the DWARF of parity-out/sdk/dbgobj/CAGuard.o (size 84): the CAMutex base (+0x00..+0x37),
// +0x38 mCondVar.
//
// The SDK header's nested Locker helper class and its Log_Average_Latency members are not carried (no ported code
// uses them).
#ifndef CAGUARD_H_INCLUDED
#define CAGUARD_H_INCLUDED
#include "CAMutex.h"
#include <MacTypes.h>
#include <pthread.h>
class CAGuard : public CAMutex
{
public:
CAGuard(const char* inName);
virtual ~CAGuard();
virtual void Wait();
virtual bool WaitFor(UInt64 inNanos);
virtual bool WaitUntil(UInt64 inNanos);
virtual void Notify();
virtual void NotifyAll();
protected:
pthread_cond_t mCondVar;
};
#endif