Skip to content

Commit a9db3a2

Browse files
author
GH Action
committed
1 parent fe77299 commit a9db3a2

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

examples/cube/cube.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,7 @@ extern "C" fn cleanup(user_data: *mut ffi::c_void) {
157157

158158
fn main() {
159159
// Heap allocated state struct, passed to app callbacks via user_data
160-
let state = Box::new(State {
161-
rx: 0.0,
162-
ry: 0.0,
163-
pip: sg::Pipeline::new(),
164-
bind: sg::Bindings::new(),
165-
});
160+
let state = Box::new(State { rx: 0.0, ry: 0.0, pip: sg::Pipeline::new(), bind: sg::Bindings::new() });
166161

167162
// Forget the ownership so we can pass as a user_data pointer
168163
let user_data = Box::into_raw(state) as *mut ffi::c_void;

examples/sgl-context/sgl-context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ fn main() {
211211
sgl_pip: sgl::Pipeline::new(),
212212
},
213213
});
214-
214+
215215
let user_data = Box::into_raw(state) as *mut ffi::c_void;
216216

217217
sapp::run(&sapp::Desc {

examples/texcube/texcube.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ fn main() {
204204
rx: 0.0,
205205
ry: 0.0,
206206
});
207-
207+
208208
let user_data = Box::into_raw(state) as *mut ffi::c_void;
209209

210210
sapp::run(&sapp::Desc {

src/sokol/c/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)