diff --git a/events.go b/events.go index fc149d7..846fbb9 100644 --- a/events.go +++ b/events.go @@ -11,6 +11,7 @@ import ( "time" "github.com/faiface/beep" + "github.com/faiface/beep/effects" "github.com/faiface/beep/mp3" "github.com/fhs/gompd/v2/mpd" "github.com/google/uuid" @@ -168,12 +169,19 @@ func (app *App) ambiancePlay(payload ...interface{}) { if err != nil { log.Fatal(err) } + loop := beep.Loop(-1, play) + + volume := &effects.Volume{ + Streamer: loop, + Base: 2, + Volume: -2, + Silent: false, + } discordspeaker.Pause(false) discordspeaker.Lock() app.ambiance.Clear() - loop := beep.Loop(-1, play) - app.ambiance.Add(loop) + app.ambiance.Add(volume) discordspeaker.Unlock() msg := make(map[string]interface{}) diff --git a/queue.go b/queue.go index fb3082a..fb33e23 100644 --- a/queue.go +++ b/queue.go @@ -6,6 +6,7 @@ import ( "time" "github.com/faiface/beep" + "github.com/faiface/beep/effects" "github.com/kataras/go-events" "dndmusicbot/ffmpeg" @@ -28,7 +29,14 @@ func init() { log.Fatal(err) } - discordspeaker.Play(mpdstream) + volume := &effects.Volume{ + Streamer: mpdstream, + Base: 2, + Volume: -2, + Silent: false, + } + + discordspeaker.Play(volume) /* app.queue = new(Queue)