mirror of
https://github.com/vsariola/sointu.git
synced 2025-07-21 06:24:32 -04:00
Separate Synth and SynthState: SynthState is the part that Render changes.
This should make testing easier, as Synth can be assumed to stay the same during each call. Synth is also the part that we can parse from .asm/.json file and a Patch can be compiled into a synth. Synth can be eventually made quite opaque to the user. The user should not need to worry about opcodes etc.
This commit is contained in:
@ -38,7 +38,12 @@ func TestSongRender(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatalf("NewSong failed: %v", err)
|
||||
}
|
||||
buffer, err := song.Render()
|
||||
synth, err := bridge.Compile(patch)
|
||||
if err != nil {
|
||||
t.Fatalf("Compiling patch failed: %v", err)
|
||||
}
|
||||
state := bridge.NewSynthState()
|
||||
buffer, err := song.Render(synth, state)
|
||||
if err != nil {
|
||||
t.Fatalf("Render failed: %v", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user