feat(tracker): add menu item to export .wav

Also refactor the common functions for .wav export into base package so that both sointu-play and tracker can use same functions.
This commit is contained in:
vsariola
2021-04-17 14:24:05 +03:00
parent 7893c1d1ed
commit 1b4f1a8c5e
6 changed files with 163 additions and 81 deletions

View File

@ -70,6 +70,7 @@ type Tracker struct {
PatternOrderScrollBar *ScrollBar
ConfirmInstrDelete *Dialog
ConfirmSongDialog *Dialog
WaveTypeDialog *Dialog
ConfirmSongActionType int
window *app.Window
@ -82,6 +83,7 @@ type Tracker struct {
errorChannel chan error
quitted bool
audioContext sointu.AudioContext
synthService sointu.SynthService
*tracker.Model
}
@ -165,8 +167,10 @@ func New(audioContext sointu.AudioContext, synthService sointu.SynthService, syn
PatternOrderScrollBar: &ScrollBar{Axis: layout.Vertical},
ConfirmInstrDelete: new(Dialog),
ConfirmSongDialog: new(Dialog),
WaveTypeDialog: new(Dialog),
errorChannel: make(chan error, 32),
window: window,
synthService: synthService,
}
t.Model = tracker.NewModel()
vuBufferObserver := make(chan []float32)