refactor(tracker): split Volume to PeakVolume and AverageVolume

This commit is contained in:
5684185+vsariola@users.noreply.github.com
2023-10-19 22:16:13 +03:00
parent 1a8a317464
commit 50ccfe03da
5 changed files with 65 additions and 47 deletions

View File

@ -55,7 +55,8 @@ type Tracker struct {
TrackEditor *TrackEditor
Explorer *explorer.Explorer
lastVolume tracker.Volume
lastAvgVolume tracker.Volume
lastPeakVolume tracker.Volume
wavFilePath string
quitChannel chan struct{}
@ -198,7 +199,8 @@ mainloop:
if err, ok := e.Inner.(tracker.PlayerVolumeErrorMessage); ok {
t.Alert.Update(err.Error(), Warning, time.Second*3)
}
t.lastVolume = e.Volume
t.lastAvgVolume = e.AverageVolume
t.lastPeakVolume = e.PeakVolume
t.InstrumentEditor.voiceStates = e.VoiceStates
t.ProcessPlayerMessage(e)
w.Invalidate()