Skip to content

Commit

Permalink
add CoreMidi support
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Gutekanst <[email protected]>
  • Loading branch information
slimsag committed Jan 13, 2024
1 parent a3d2b68 commit 7f8cf29
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core_midi_manual.zig
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const c = @import("../c.zig");
const cf = @import("../core_foundation/cf.zig");
const ns = @import("../foundation/ns.zig");

// ------------------------------------------------------------------------------------------------
// Types
9 changes: 9 additions & 0 deletions generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,13 @@ zig run mach-objc-generator/src/main.zig -- --framework AVFAudio >> src/avf_audi
zig fmt src/avf_audio/avaudio.zig
rm headers.json headers.m

echo "
#include <CoreMIDI/MidiServices.h>
" > headers.m
clang headers.m -Xclang -ast-dump=json -fsyntax-only > headers.json
cat core_midi_manual.zig > src/core_midi/coremidi.zig
zig run mach-objc-generator/src/main.zig -- --framework CoreMIDI >> src/core_midi/coremidi.zig
zig fmt src/core_midi/coremidi.zig
rm headers.json headers.m

rm -rf mach-objc-generator

0 comments on commit 7f8cf29

Please sign in to comment.