Skip to content

Commit f30824c

Browse files
authored
Merge pull request #1055 from kimshrier/fix-include-for-freebsd
Fix include to work on FreeBSD
2 parents 090d544 + 9cde865 commit f30824c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sokol_audio.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
4040
- on macOS: AudioToolbox
4141
- on iOS: AudioToolbox, AVFoundation
42+
- on FreeBSD: asound
4243
- on Linux: asound
4344
- on Android: link with OpenSLES or aaudio
4445
- on Windows with MSVC or Clang toolchain: no action needed, libs are defined in-source via pragma-comment-lib
@@ -51,6 +52,7 @@
5152
5253
- Windows: WASAPI
5354
- Linux: ALSA
55+
- FreeBSD: ALSA
5456
- macOS: CoreAudio
5557
- iOS: CoreAudio+AVAudioSession
5658
- emscripten: WebAudio with ScriptProcessorNode
@@ -780,7 +782,9 @@ inline void saudio_setup(const saudio_desc& desc) { return saudio_setup(&desc);
780782
#include "aaudio/AAudio.h"
781783
#endif
782784
#elif defined(_SAUDIO_LINUX)
783-
#include <alloca.h>
785+
#if !defined(__FreeBSD__)
786+
#include <alloca.h>
787+
#endif
784788
#define _SAUDIO_PTHREADS (1)
785789
#include <pthread.h>
786790
#define ALSA_PCM_NEW_HW_PARAMS_API

0 commit comments

Comments
 (0)