mirror of
https://github.com/vsariola/sointu.git
synced 2026-08-16 22:56:58 -04:00
fix(vm/compiler)!: don't define SU_BUFFER_LENGTH when speed is used
BREAKING CHANGE: If song uses a speed unit, SU_LENGTH_IN_SAMPLES, SU_BUFFER_LENGTH and SU_SYNCBUFFER_LENGTH won't be defined in the generated header file, as we cannot know their exact values during compile time without rendering the entire song. When using a speed unit, the user has to take responsibility of allocating large enough buffers. Closes #241
This commit is contained in:
@@ -143,10 +143,14 @@ func main() {
|
||||
var compiledPlayer map[string]string
|
||||
if compile {
|
||||
var err error
|
||||
compiledPlayer, err = comp.Song(&song)
|
||||
var warnings []string
|
||||
compiledPlayer, warnings, err = comp.Song(&song)
|
||||
if err != nil {
|
||||
return fmt.Errorf("compiling player failed: %v", err)
|
||||
}
|
||||
for _, warning := range warnings {
|
||||
fmt.Fprintf(os.Stderr, "warning: %v\n", warning)
|
||||
}
|
||||
if len(*extensionsOut) > 0 {
|
||||
compiledPlayer = filterExtensions(compiledPlayer, strings.Split(*extensionsOut, ","))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user