Add some volume adjustments
parent
8667839c44
commit
757275c8f6
12
events.go
12
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{})
|
||||
|
|
10
queue.go
10
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)
|
||||
|
|
Loading…
Reference in New Issue