Blame patches/mpg123-1.29.3.local.patch

c32e0a
diff -ru mpg123-1.29.3.orig/src/libmpg123/getcpuflags_x86_64.S mpg123-1.29.3/src/libmpg123/getcpuflags_x86_64.S
c32e0a
--- mpg123-1.29.3.orig/src/libmpg123/getcpuflags_x86_64.S       2021-12-10 08:00:58.000000000 +0100
c32e0a
+++ mpg123-1.29.3/src/libmpg123/getcpuflags_x86_64.S    2022-02-06 11:23:51.183460189 +0100
c32e0a
@@ -55,3 +55,11 @@
c32e0a
        ret
c32e0a
c32e0a
 NONEXEC_STACK
c32e0a
+
Lucio Andrés Illanes Albornoz 220a24
+#ifdef __midipix__
c32e0a
+        .section .got$getcpuflags,"r"
c32e0a
+        .global __imp_getcpuflags
c32e0a
+__imp_getcpuflags:
c32e0a
+        .quad   getcpuflags
c32e0a
+        .linkonce discard
Lucio Andrés Illanes Albornoz 220a24
+#endif
c32e0a
diff -ru mpg123-1.29.3.orig/src/libmpg123/mangle.h mpg123-1.29.3/src/libmpg123/mangle.h
c32e0a
--- mpg123-1.29.3.orig/src/libmpg123/mangle.h   2021-12-10 08:00:58.000000000 +0100
c32e0a
+++ mpg123-1.29.3/src/libmpg123/mangle.h        2022-02-06 11:22:16.299458283 +0100
c32e0a
@@ -172,7 +172,7 @@
c32e0a
 #define NONEXEC_STACK
c32e0a
 #endif
c32e0a
c32e0a
-#if (defined(__x86_64__) || defined(_M_X64)) && (defined(_WIN64) || defined (__CYGWIN__))
c32e0a
+#if (defined(__x86_64__) || defined(_M_X64)) && (defined(_WIN64) || defined (__CYGWIN__) || defined(__midipix__))
c32e0a
 #define IS_MSABI 1 /* Not using SYSV */
c32e0a
 #endif
c32e0a
Lucio Andrés Illanes Albornoz 220a24
diff -ru mpg123-1.25.10.orig/src/intsym.h mpg123-1.25.10/src/intsym.h
Lucio Andrés Illanes Albornoz 220a24
--- mpg123-1.25.10.orig/src/intsym.h	2018-02-27 11:26:38.000000000 +0100
Lucio Andrés Illanes Albornoz 220a24
+++ mpg123-1.25.10/src/intsym.h	2018-11-04 01:04:36.017552210 +0100
Lucio Andrés Illanes Albornoz 220a24
@@ -3,6 +3,7 @@
Lucio Andrés Illanes Albornoz 220a24
 /* Mapping of internal mpg123 symbols to something that is less likely to
Lucio Andrés Illanes Albornoz 220a24
    conflict in case of static linking. */
Lucio Andrés Illanes Albornoz 220a24
 #include "config.h"
Lucio Andrés Illanes Albornoz 220a24
+#ifndef __midipix__
Lucio Andrés Illanes Albornoz 220a24
 #define COS9 INT123_COS9
Lucio Andrés Illanes Albornoz 220a24
 #define tfcos36 INT123_tfcos36
Lucio Andrés Illanes Albornoz 220a24
 #define pnts INT123_pnts
Lucio Andrés Illanes Albornoz 220a24
@@ -358,3 +359,4 @@
Lucio Andrés Illanes Albornoz 220a24
 #define strerror INT123_strerror
Lucio Andrés Illanes Albornoz 220a24
 #endif
Lucio Andrés Illanes Albornoz 220a24
 #endif
Lucio Andrés Illanes Albornoz 220a24
+#endif
Lucio Andrés Illanes Albornoz 220a24
diff -ru mpg123-1.25.10.orig/src/libout123/modules/win32.c mpg123-1.25.10/src/libout123/modules/win32.c
Lucio Andrés Illanes Albornoz 220a24
--- mpg123-1.25.10.orig/src/libout123/modules/win32.c	2018-02-27 11:26:38.000000000 +0100
Lucio Andrés Illanes Albornoz 220a24
+++ mpg123-1.25.10/src/libout123/modules/win32.c	2018-11-04 12:29:01.346944126 +0100
c32e0a
@@ -11,8 +11,51 @@
Lucio Andrés Illanes Albornoz 220a24
 
Lucio Andrés Illanes Albornoz 220a24
 #include "out123_int.h"
Lucio Andrés Illanes Albornoz 220a24
 #include <windows.h>
Lucio Andrés Illanes Albornoz 220a24
+#include <mmsystem.h>
Lucio Andrés Illanes Albornoz 220a24
 #include "debug.h"
Lucio Andrés Illanes Albornoz 220a24
 
Lucio Andrés Illanes Albornoz 220a24
+/* temporary stuffs :D */
c32e0a
+
c32e0a
+  typedef struct tagWAVEOUTCAPSA {
c32e0a
+    WORD wMid;
c32e0a
+    WORD wPid;
c32e0a
+    UINT vDriverVersion;
c32e0a
+    CHAR szPname[32];
c32e0a
+    DWORD dwFormats;
c32e0a
+    WORD wChannels;
c32e0a
+    WORD wReserved1;
c32e0a
+    DWORD dwSupport;
c32e0a
+  } WAVEOUTCAPSA,*PWAVEOUTCAPSA,*NPWAVEOUTCAPSA,*LPWAVEOUTCAPSA;
c32e0a
+
c32e0a
+#define waveOutGetDevCaps waveOutGetDevCapsW
c32e0a
+
Lucio Andrés Illanes Albornoz 220a24
+#define WAVE_MAPPER ((UINT)-1)
Lucio Andrés Illanes Albornoz 220a24
+
Lucio Andrés Illanes Albornoz 220a24
+#define WAVE_FORMAT_PCM 1
c32e0a
+#define WAVE_FORMAT_1M08 0x00000001
c32e0a
+#define WAVE_FORMAT_1M16 0x00000004
c32e0a
+#define WAVE_FORMAT_2M08 0x00000010
c32e0a
+#define WAVE_FORMAT_2S08 0x00000020
c32e0a
+#define WAVE_FORMAT_2M16 0x00000040
c32e0a
+#define WAVE_FORMAT_2S16 0x00000080
c32e0a
+#define WAVE_FORMAT_4M08 0x00000100
c32e0a
+#define WAVE_FORMAT_4S08 0x00000200
c32e0a
+#define WAVE_FORMAT_4M16 0x00000400
c32e0a
+#define WAVE_FORMAT_4S16 0x00000800
Lucio Andrés Illanes Albornoz 220a24
+
Lucio Andrés Illanes Albornoz 220a24
+#define INFINITE 0xffffffff
Lucio Andrés Illanes Albornoz 220a24
+
Lucio Andrés Illanes Albornoz 220a24
+#define WAVERR_BASE 32
Lucio Andrés Illanes Albornoz 220a24
+#define WAVERR_BADFORMAT (WAVERR_BASE + 0)
Lucio Andrés Illanes Albornoz 220a24
+
Lucio Andrés Illanes Albornoz 220a24
+#define MMSYSERR_BASE 0
Lucio Andrés Illanes Albornoz 220a24
+#define MMSYSERR_NOERROR 0
Lucio Andrés Illanes Albornoz 220a24
+#define MMSYSERR_ALLOCATED (MMSYSERR_BASE + 4)
Lucio Andrés Illanes Albornoz 220a24
+#define MMSYSERR_NODRIVER (MMSYSERR_BASE + 6)
Lucio Andrés Illanes Albornoz 220a24
+#define MMSYSERR_NOMEM (MMSYSERR_BASE + 7)
Lucio Andrés Illanes Albornoz 220a24
+/* hello there! */
Lucio Andrés Illanes Albornoz 220a24
+
Lucio Andrés Illanes Albornoz 220a24
+
Lucio Andrés Illanes Albornoz 220a24
 /*
Lucio Andrés Illanes Albornoz 220a24
     Buffer size and number of buffers in the playback ring
Lucio Andrés Illanes Albornoz 220a24
     NOTE: This particular num/size combination performs best under heavy