vorbis.go 864 B

1234567891011121314151617181920212223
  1. // Copyright 2016 The G3N Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. // Package vorbis implements the Go bindings of a subset (only one function) of the functions of the libvorbis library
  5. // See API reference at: https://xiph.org/vorbis/doc/libvorbis/reference.html
  6. package vorbis
  7. // #cgo darwin CFLAGS: -DGO_DARWIN -I/usr/include/vorbis
  8. // #cgo linux CFLAGS: -DGO_LINUX -I/usr/include/vorbis
  9. // #cgo windows CFLAGS: -DGO_WINDOWS -I/usr/include/vorbis
  10. // #cgo darwin LDFLAGS: -lvorbis
  11. // #cgo linux LDFLAGS: -lvorbis
  12. // #cgo windows LDFLAGS: -lvorbis
  13. // #include "codec.h"
  14. import "C"
  15. // VersionString returns a string giving version information for libvorbis
  16. func VersionString() string {
  17. cstr := C.vorbis_version_string()
  18. return C.GoString(cstr)
  19. }