mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Add MessageDecompose; Update the static library
This commit is contained in:
Vendored
+11
-3
@@ -109,8 +109,8 @@ DeviceInfo :: struct {
|
|||||||
structVersion: c.int, /**< this internal structure version */
|
structVersion: c.int, /**< this internal structure version */
|
||||||
interf: cstring, /**< underlying MIDI API, e.g. MMSystem or DirectX */
|
interf: cstring, /**< underlying MIDI API, e.g. MMSystem or DirectX */
|
||||||
name: cstring, /**< device name, e.g. USB MidiSport 1x1 */
|
name: cstring, /**< device name, e.g. USB MidiSport 1x1 */
|
||||||
input: c.int, /**< true iff input is available */
|
input: b32, /**< true iff input is available */
|
||||||
output: c.int, /**< true iff output is available */
|
output: b32, /**< true iff output is available */
|
||||||
opened: b32, /**< used by generic PortMidi code to do error checking on arguments */
|
opened: b32, /**< used by generic PortMidi code to do error checking on arguments */
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -210,7 +210,6 @@ foreign lib {
|
|||||||
|
|
||||||
Any stream that is successfully opened should eventually be closed
|
Any stream that is successfully opened should eventually be closed
|
||||||
by calling Close().
|
by calling Close().
|
||||||
|
|
||||||
*/
|
*/
|
||||||
OpenInput :: proc(stream: ^Stream,
|
OpenInput :: proc(stream: ^Stream,
|
||||||
inputDevice: DeviceID,
|
inputDevice: DeviceID,
|
||||||
@@ -379,6 +378,15 @@ MessageData2 :: #force_inline proc "c" (msg: Message) -> c.int {
|
|||||||
return c.int((msg >> 16) & 0xFF)
|
return c.int((msg >> 16) & 0xFF)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MessageCompose :: MessageMake
|
||||||
|
MessageDecompose :: #force_inline proc "c" (msg: Message) -> (status, data1, data2: c.int) {
|
||||||
|
status = c.int(msg & 0xFF)
|
||||||
|
data1 = c.int((msg >> 8) & 0xFF)
|
||||||
|
data2 = c.int((msg >> 16) & 0xFF)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Message :: distinct i32
|
Message :: distinct i32
|
||||||
/**
|
/**
|
||||||
All midi data comes in the form of Event structures. A sysex
|
All midi data comes in the form of Event structures. A sysex
|
||||||
|
|||||||
Vendored
BIN
Binary file not shown.
Reference in New Issue
Block a user