forked from andrepxx/go-dsp-guitar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
38 lines (32 loc) · 747 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package main
import (
"flag"
"fmt"
"github.com/andrepxx/go-dsp-guitar/controller"
)
/*
* The entry point of our program.
*/
func main() {
numChannels := flag.Uint64("channels", 0, "Number of channels for batch processing")
versionFlag := flag.Bool("version", false, "Print version information and exit")
flag.Parse()
/*
* Print version information or start the actual application.
*/
if *versionFlag {
msg, err := controller.Version()
/*
* If an error occured, print error message, otherwise
* print version information.
*/
if err != nil {
msg = err.Error()
}
fmt.Printf("%s\n", msg)
} else {
numChannels32 := uint32(*numChannels)
cn := controller.CreateController()
cn.Operate(numChannels32)
}
}