Added Version()

This commit is contained in:
DataHoarder 2022-07-28 13:13:19 +02:00
parent 6d5898cd9f
commit af4ded4c0a
Signed by: DataHoarder
SSH key fingerprint: SHA256:OLTRf6Fl87G52SiR7sWLGNzlJt4WOX+tfI2yxo0z7xk
2 changed files with 21 additions and 0 deletions

11
version.go Normal file
View file

@ -0,0 +1,11 @@
package go_vorbis
/*
#cgo pkg-config: vorbis
#include <vorbis/codec.h>
*/
import "C"
func Version() string {
return C.GoString(C.vorbis_version_string())
}

10
version_test.go Normal file
View file

@ -0,0 +1,10 @@
package go_vorbis
import (
"log"
"testing"
)
func TestVersion(t *testing.T) {
log.Print(Version())
}