mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-24 09:14:04 +02:00
Rearrange some includes.
Some headers are only required for the device IO API. This commit moves these headers to the device IO section that they're excluded when MA_NO_DEVICE_IO is set. Public issue https://github.com/dr-soft/miniaudio/issues/138
This commit is contained in:
+17
-14
@@ -5499,25 +5499,11 @@ IMPLEMENTATION
|
|||||||
|
|
||||||
#ifdef MA_WIN32
|
#ifdef MA_WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <objbase.h>
|
|
||||||
#include <mmreg.h>
|
|
||||||
#include <mmsystem.h>
|
|
||||||
#else
|
#else
|
||||||
#include <stdlib.h> /* For malloc(), free(), wcstombs(). */
|
#include <stdlib.h> /* For malloc(), free(), wcstombs(). */
|
||||||
#include <string.h> /* For memset() */
|
#include <string.h> /* For memset() */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(MA_APPLE) && (__MAC_OS_X_VERSION_MIN_REQUIRED < 101200)
|
|
||||||
#include <mach/mach_time.h> /* For mach_absolute_time() */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef MA_POSIX
|
|
||||||
#include <sys/time.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <dlfcn.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef MA_EMSCRIPTEN
|
#ifdef MA_EMSCRIPTEN
|
||||||
#include <emscripten/emscripten.h>
|
#include <emscripten/emscripten.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -7446,6 +7432,23 @@ DEVICE I/O
|
|||||||
*************************************************************************************************************************************************************
|
*************************************************************************************************************************************************************
|
||||||
************************************************************************************************************************************************************/
|
************************************************************************************************************************************************************/
|
||||||
#ifndef MA_NO_DEVICE_IO
|
#ifndef MA_NO_DEVICE_IO
|
||||||
|
#ifdef MA_WIN32
|
||||||
|
#include <objbase.h>
|
||||||
|
#include <mmreg.h>
|
||||||
|
#include <mmsystem.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(MA_APPLE) && (__MAC_OS_X_VERSION_MIN_REQUIRED < 101200)
|
||||||
|
#include <mach/mach_time.h> /* For mach_absolute_time() */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef MA_POSIX
|
||||||
|
#include <sys/time.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <dlfcn.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Unfortunately using runtime linking for pthreads causes problems. This has occurred for me when testing on FreeBSD. When
|
Unfortunately using runtime linking for pthreads causes problems. This has occurred for me when testing on FreeBSD. When
|
||||||
using runtime linking, deadlocks can occur (for me it happens when loading data from fread()). It turns out that doing
|
using runtime linking, deadlocks can occur (for me it happens when loading data from fread()). It turns out that doing
|
||||||
|
|||||||
Reference in New Issue
Block a user