dndmusicbot/queue.go

44 lines
654 B
Go
Raw Permalink Normal View History

2022-11-18 21:18:12 +00:00
package main
import (
"log"
"github.com/gopxl/beep"
"github.com/gopxl/beep/effects"
2022-11-18 21:18:12 +00:00
discordspeaker "dndmusicbot/speaker"
)
2022-12-03 18:22:05 +00:00
var pl_volume *effects.Volume
var amb_volume *effects.Volume
2022-11-18 21:18:12 +00:00
func init() {
log.Println("beep.go loading..")
2022-11-23 07:37:59 +00:00
app.ambiance = beep.Mixer{}
2022-12-03 18:22:05 +00:00
amb_volume = &effects.Volume{
Streamer: &app.ambiance,
Base: 2,
Volume: 2,
Silent: false,
}
discordspeaker.Play(amb_volume)
2022-11-18 21:18:12 +00:00
2022-11-23 07:37:59 +00:00
mpdstream, err := NewMPD()
if err != nil {
log.Fatal(err)
}
2022-12-03 18:22:05 +00:00
pl_volume = &effects.Volume{
2022-11-23 22:29:45 +00:00
Streamer: mpdstream,
Base: 2,
Volume: -2,
Silent: false,
}
2022-12-03 18:22:05 +00:00
discordspeaker.Play(pl_volume)
2022-11-23 07:37:59 +00:00
log.Println("beep.go done.")
2022-11-18 21:18:12 +00:00
}