diff options
author | Ørjan Malde <red@foxi.me> | 2022-08-26 16:44:31 +0200 |
---|---|---|
committer | Ørjan Malde <red@foxi.me> | 2022-08-26 16:44:31 +0200 |
commit | 9d1de1364b82a953bdb656222df2e894bb5aaa49 (patch) | |
tree | 9e6730875f7578759c15f66a755f516e5bb1f51e /patches | |
parent | e6168fa93bd6ba7672e47c2a347328fd6b0476de (diff) | |
download | midipix_build-9d1de1364b82a953bdb656222df2e894bb5aaa49.tar.bz2 midipix_build-9d1de1364b82a953bdb656222df2e894bb5aaa49.tar.xz |
groups/251.native_packages_lib.group: adds libao v1.2.0
Signed-off-by: Ørjan Malde <red@foxi.me>
Diffstat (limited to 'patches')
-rw-r--r-- | patches/libao-1.2.0.local.patch | 88 | ||||
-rw-r--r-- | patches/libao-1.2.0_pre.local.patch | 12 |
2 files changed, 100 insertions, 0 deletions
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 <windows.h> +-#include <mmreg.h> + #include <mmsystem.h> +-#include <ksmedia.h> + + #include <stdlib.h> + #include <string.h> +@@ -41,6 +39,47 @@ + #include <stdarg.h> + #include <stdio.h> + ++#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); + diff --git a/patches/libao-1.2.0_pre.local.patch b/patches/libao-1.2.0_pre.local.patch new file mode 100644 index 00000000..7434fd69 --- /dev/null +++ b/patches/libao-1.2.0_pre.local.patch @@ -0,0 +1,12 @@ +diff -ru libao-1.2.0.orig/configure libao-1.2.0/configure +--- libao-1.2.0.orig/configure 2014-01-27 17:10:36.000000000 +0000 ++++ libao-1.2.0/configure 2022-08-26 14:36:45.678689200 +0000 +@@ -12333,7 +12333,7 @@ + + + +-have_wmm="no" ++have_wmm="yes" + # Check whether --enable-wmm was given. + if test "${enable_wmm+set}" = set; then : + enableval=$enable_wmm; |