mirror of
https://github.com/vsariola/sointu.git
synced 2025-07-24 16:04:51 -04:00
feat(sointu-cli): Add ability to adjust HOLD value of the patterns
This commit is contained in:
@ -27,6 +27,7 @@ func main() {
|
||||
exactLength := flag.Bool("e", false, "When outputting the C header file, calculate the exact length of song by rendering it once. Only useful when using SPEED opcodes.")
|
||||
rawOut := flag.Bool("r", false, "Output the rendered song as .raw stereo float32 buffer, to standard output unless otherwise specified.")
|
||||
directory := flag.String("d", "", "Directory where to output all files. The directory and its parents are created if needed. By default, everything is placed in the same directory where the original song file is.")
|
||||
hold := flag.Int("o", -1, "New value to be used as the hold value")
|
||||
flag.Usage = printUsage
|
||||
flag.Parse()
|
||||
if flag.NArg() == 0 || *help {
|
||||
@ -105,6 +106,12 @@ func main() {
|
||||
return fmt.Errorf("Error playing: %v", err)
|
||||
}
|
||||
}
|
||||
if *hold > -1 {
|
||||
err = song.UpdateHold(byte(*hold))
|
||||
if err != nil {
|
||||
return fmt.Errorf("error updating the hold value of the song: %v", err)
|
||||
}
|
||||
}
|
||||
if *headerOut {
|
||||
maxSamples := 0 // 0 means it is calculated automatically
|
||||
if *exactLength {
|
||||
|
Reference in New Issue
Block a user