From 9d1de1364b82a953bdb656222df2e894bb5aaa49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98rjan=20Malde?= Date: Fri, 26 Aug 2022 16:44:31 +0200 Subject: groups/251.native_packages_lib.group: adds libao v1.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ørjan Malde --- patches/libao-1.2.0.local.patch | 88 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 patches/libao-1.2.0.local.patch (limited to 'patches/libao-1.2.0.local.patch') diff --git a/patches/libao-1.2.0.local.patch b/patches/libao-1.2.0.local.patch new file mode 100644 index 00000000..97a9ee54 --- /dev/null +++ b/patches/libao-1.2.0.local.patch @@ -0,0 +1,88 @@ +diff -ru libao-1.2.0.orig/src/ao_wmm.c libao-1.2.0/src/ao_wmm.c +--- libao-1.2.0.orig/src/ao_wmm.c 2012-02-14 00:46:06.000000000 +0000 ++++ libao-1.2.0/src/ao_wmm.c 2022-08-26 14:17:15.193852800 +0000 +@@ -31,9 +31,7 @@ + #define _CRT_SECURE_NO_DEPRECATE + + #include +-#include + #include +-#include + + #include + #include +@@ -41,6 +39,47 @@ + #include + #include + ++#define waveOutGetErrorText waveOutGetErrorTextA ++#define waveOutGetDevCaps waveOutGetDevCapsA ++ ++#ifndef WAVE_MAPPER ++#define WAVE_MAPPER ((unsigned int)-1) ++#endif ++ ++#ifndef WAVE_FORMAT_EXTENSIBLE ++#define WAVE_FORMAT_EXTENSIBLE 0xFFFE ++#endif ++ ++#ifndef WAVE_ALLOWSYNC ++#define WAVE_ALLOWSYNC 0x0002 ++#endif ++ ++#ifndef CALLBACK_NULL ++#define CALLBACK_NULL (unsigned int)(0x00000000) ++#endif ++ ++typedef struct { ++ WAVEFORMATEX Format; ++ union { ++ WORD wValidBitsPerSample; ++ WORD wSamplesPerBlock; ++ WORD wReserved; ++ } Samples; ++ DWORD dwChannelMask; ++ GUID SubFormat; ++} WAVEFORMATEXTENSIBLE,*PWAVEFORMATEXTENSIBLE; ++ ++typedef struct tagWAVEOUTCAPSA { ++ WORD wMid; ++ WORD wPid; ++ UINT vDriverVersion; ++ CHAR szPname[32]; ++ DWORD dwFormats; ++ WORD wChannels; ++ WORD wReserved1; ++ DWORD dwSupport; ++} WAVEOUTCAPS; ++ + #ifndef KSDATAFORMAT_SUBTYPE_PCM + #define KSDATAFORMAT_SUBTYPE_PCM (GUID) {0x00000001,0x0000,0x0010,{0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71}} + #endif +@@ -339,7 +378,7 @@ + unsigned int ms = (internal->msPerBlock>>1)+1; + if (wait_all) ms *= n; + adebug("sleep for %ums wait on %d blocks\n",ms, internal->sent_blocks); +- Sleep(ms); ++ usleep(ms * 1000); + } + } + +@@ -558,7 +597,7 @@ + const int idx = _ao_get_free_block(device); + + if (idx == -1) { +- Sleep(internal->msPerBlock); ++ usleep(internal->msPerBlock * 1000); + continue; + } + +@@ -572,7 +611,7 @@ + } + + /* Do copy */ +- CopyMemory((char*)internal->wh[idx].wh.lpData ++ memcpy((char*)internal->wh[idx].wh.lpData + + internal->wh[idx].count, + output_samples, n); + -- cgit v1.2.3