mirror of
https://github.com/vsariola/sointu.git
synced 2025-05-28 03:10:24 -04:00
possible to disable wasm render on start
This commit is contained in:
parent
c429178758
commit
53a8429a69
11
song.go
11
song.go
@ -11,11 +11,12 @@ import (
|
||||
// playback speed, but this could be changed to a floating point in future if
|
||||
// finer adjustments are necessary.
|
||||
type Song struct {
|
||||
BPM int
|
||||
RowsPerBeat int
|
||||
Score Score
|
||||
Patch Patch
|
||||
CreateEmptyPatterns bool
|
||||
BPM int
|
||||
RowsPerBeat int
|
||||
Score Score
|
||||
Patch Patch
|
||||
CreateEmptyPatterns bool
|
||||
WasmDisableRenderOnStart bool
|
||||
}
|
||||
|
||||
// Copy makes a deep copy of a Score.
|
||||
|
@ -880,7 +880,9 @@
|
||||
(export "render_128_samples" (func $render_128_samples))
|
||||
(export "update_voices" (func $su_update_voices))
|
||||
|
||||
{{- if .RenderOnStart }}
|
||||
(start $render) ;; we run render automagically when the module is instantiated
|
||||
{{- end}}
|
||||
|
||||
(func $render (param)
|
||||
{{- if .Output16Bit }} (local $channel i32) {{- end }}
|
||||
|
@ -1,6 +1,7 @@
|
||||
bpm: 120
|
||||
rowsperbeat: 4
|
||||
createemptypatterns: true
|
||||
wasmdisablerenderonstart: false
|
||||
score:
|
||||
length: 1
|
||||
rowsperpattern: 16
|
||||
|
@ -126,7 +126,8 @@ func (com *Compiler) Song(song *sointu.Song) (map[string]string, error) {
|
||||
PatternLength int
|
||||
SequenceLength int
|
||||
Hold int
|
||||
}{compilerMacros, featureSetMacros, wasmMacros, songMacros, encodedPatch, patterns, sequences, len(patterns[0]), len(sequences[0]), 1}
|
||||
RenderOnStart bool
|
||||
}{compilerMacros, featureSetMacros, wasmMacros, songMacros, encodedPatch, patterns, sequences, len(patterns[0]), len(sequences[0]), 1, !song.WasmDisableRenderOnStart}
|
||||
populatedTemplate, extension, err = com.compile(templateName, &data)
|
||||
}
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user