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

52
PortabilityLayer/QDPort.h Normal file
View File

@@ -0,0 +1,52 @@
#pragma once
#include <stdint.h>
#include "PixelFormat.h"
#include "QDState.h"
struct PixMap;
struct Rect;
namespace PortabilityLayer
{
enum QDPortType
{
QDPortType_Invalid,
QDPortType_CGraf,
QDPortType_Window,
};
class QDPort
{
public:
explicit QDPort(QDPortType portType);
~QDPort();
int Init(const Rect &rect, PixelFormat pixelFormat);
QDPortType GetPortType() const;
PixMap **GetPixMap() const;
const QDState *GetState() const;
QDState *GetState();
PixelFormat GetPixelFormat() const;
Rect GetRect() const;
private:
QDPortType m_portType;
QDState m_state;
PixMap **m_pixMap;
int16_t m_left;
int16_t m_top;
uint16_t m_width;
uint16_t m_height;
PixelFormat m_pixelFormat;
};
inline QDPortType QDPort::GetPortType() const
{
return m_portType;
}
}