From 98e5221b7bb65fc31122344aab342a1c337ead66 Mon Sep 17 00:00:00 2001 From: Alexandre Boucey Date: Sun, 7 Jan 2024 12:33:57 +0100 Subject: [PATCH] Go: add GetVersion call --- contrib/go/rtmidi/rtmidi.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/contrib/go/rtmidi/rtmidi.go b/contrib/go/rtmidi/rtmidi.go index 19b024d..0fd3e9f 100644 --- a/contrib/go/rtmidi/rtmidi.go +++ b/contrib/go/rtmidi/rtmidi.go @@ -69,6 +69,11 @@ func (api API) String() string { return "?" } +// GetVersion Return the current RtMidi version. +func GetVersion() string { + return C.GoString(C.rtmidi_get_version()) +} + // CompiledAPI determines the available compiled MIDI APIs. func CompiledAPI() (apis []API) { n := C.rtmidi_get_compiled_api(nil, 0)