mirror of
https://github.com/vsariola/sointu.git
synced 2025-06-04 01:28:45 -04:00
possible to disable wasm render on start
This commit is contained in:
parent
c429178758
commit
53a8429a69
1
song.go
1
song.go
@ -16,6 +16,7 @@ type Song struct {
|
|||||||
Score Score
|
Score Score
|
||||||
Patch Patch
|
Patch Patch
|
||||||
CreateEmptyPatterns bool
|
CreateEmptyPatterns bool
|
||||||
|
WasmDisableRenderOnStart bool
|
||||||
}
|
}
|
||||||
|
|
||||||
// Copy makes a deep copy of a Score.
|
// Copy makes a deep copy of a Score.
|
||||||
|
@ -880,7 +880,9 @@
|
|||||||
(export "render_128_samples" (func $render_128_samples))
|
(export "render_128_samples" (func $render_128_samples))
|
||||||
(export "update_voices" (func $su_update_voices))
|
(export "update_voices" (func $su_update_voices))
|
||||||
|
|
||||||
|
{{- if .RenderOnStart }}
|
||||||
(start $render) ;; we run render automagically when the module is instantiated
|
(start $render) ;; we run render automagically when the module is instantiated
|
||||||
|
{{- end}}
|
||||||
|
|
||||||
(func $render (param)
|
(func $render (param)
|
||||||
{{- if .Output16Bit }} (local $channel i32) {{- end }}
|
{{- if .Output16Bit }} (local $channel i32) {{- end }}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
bpm: 120
|
bpm: 120
|
||||||
rowsperbeat: 4
|
rowsperbeat: 4
|
||||||
createemptypatterns: true
|
createemptypatterns: true
|
||||||
|
wasmdisablerenderonstart: false
|
||||||
score:
|
score:
|
||||||
length: 1
|
length: 1
|
||||||
rowsperpattern: 16
|
rowsperpattern: 16
|
||||||
|
@ -126,7 +126,8 @@ func (com *Compiler) Song(song *sointu.Song) (map[string]string, error) {
|
|||||||
PatternLength int
|
PatternLength int
|
||||||
SequenceLength int
|
SequenceLength int
|
||||||
Hold 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)
|
populatedTemplate, extension, err = com.compile(templateName, &data)
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user