16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-21 22:59:19 +02:00

linux support

This commit is contained in:
milek7
2017-07-31 00:25:19 +02:00
parent e7623fa18f
commit f7459f3434
64 changed files with 967 additions and 602 deletions

31
Sound.h
View File

@@ -10,7 +10,38 @@ http://mozilla.org/MPL/2.0/.
#pragma once
#include <stack>
#include <cinttypes>
#ifdef _WIN32
#include <dsound.h>
#else
#define DSBFREQUENCY_MIN 0
#define DSBFREQUENCY_MAX 0
#define DSBSTATUS_PLAYING 0
#define DSBPLAY_LOOPING 0
#define DSBVOLUME_MIN 0
#define DSBVOLUME_MAX 0
struct DSBCAPS
{
uint16_t dwBufferBytes;
uint16_t dwSize;
};
struct dummysb
{
void Stop() {}
void SetCurrentPosition(int) {}
void SetVolume(int) {}
void Play(int, int, int) {}
void GetStatus(unsigned int *stat) { *stat = 0; }
void SetPan(int) {}
void SetFrequency(int) {}
void GetCaps(DSBCAPS *caps) { caps->dwBufferBytes = 0; }
};
typedef dummysb* LPDIRECTSOUNDBUFFER;
typedef int LPDIRECTSOUNDNOTIFY;
typedef int LPDIRECTSOUND;
typedef int HWND;
#endif
typedef LPDIRECTSOUNDBUFFER PSound;