agi.audio.go 602 B

123456789101112131415161718192021222324252627282930
  1. package agi
  2. import (
  3. "log"
  4. "github.com/robertkrimen/otto"
  5. "imuslab.com/arozos/mod/filesystem"
  6. user "imuslab.com/arozos/mod/user"
  7. )
  8. /*
  9. AJGI Audio Library
  10. This is a library for allowing audio playback from AGI script
  11. Powered by Go Beep and the usage might be a bit tricky
  12. Author: tobychui
  13. */
  14. func (g *Gateway) AudioLibRegister() {
  15. err := g.RegisterLib("audio", g.injectAudioFunctions)
  16. if err != nil {
  17. log.Fatal(err)
  18. }
  19. }
  20. func (g *Gateway) injectAudioFunctions(vm *otto.Otto, u *user.User, scriptFsh *filesystem.FileSystemHandler, scriptPath string) {
  21. }