free preset memory
This commit is contained in:
parent
b67aae3289
commit
5299d653aa
5
main.go
5
main.go
|
@ -6,6 +6,7 @@ import "github.com/veandco/go-sdl2/sdl"
|
|||
#cgo CFLAGS: -I/home/nick/Downloads/include
|
||||
#cgo LDFLAGS: -L/home/nick/.local/lib -lprojectM-4
|
||||
#include "projectM-4/projectM.h"
|
||||
#include <stdlib.h>
|
||||
*/
|
||||
import "C"
|
||||
|
||||
|
@ -14,6 +15,7 @@ import (
|
|||
"io"
|
||||
"os"
|
||||
"time"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
@ -47,9 +49,10 @@ func main() {
|
|||
C.projectm_set_window_size(handle, C.ulong(windowWidth), C.ulong(windowHeight))
|
||||
|
||||
preset := C.CString("/usr/share/projectM/presets/presets_stock/Zylot - Wisps.milk")
|
||||
defer C.free(unsafe.Pointer(preset))
|
||||
C.projectm_load_preset_file(handle, preset, false)
|
||||
|
||||
const bufSize int = 2048
|
||||
const bufSize uint = 2048
|
||||
|
||||
running := true
|
||||
for running {
|
||||
|
|
Loading…
Reference in New Issue