read a preset

This commit is contained in:
filifa 2024-08-22 21:37:56 -05:00
parent c709e012bf
commit b9257adf5f
1 changed files with 4 additions and 1 deletions

View File

@ -42,6 +42,9 @@ func main() {
C.projectm_set_window_size(handle, 800, 600)
preset := C.CString("/usr/share/projectM/presets/presets_projectM/Unchained - ReAwoke.milk")
C.projectm_load_preset_file(handle, preset, false)
reader := bufio.NewReader(os.Stdin)
running := true
@ -63,7 +66,7 @@ func main() {
ptr := C.CBytes(audioData)
C.projectm_pcm_add_float(handle, (*C.float)(ptr), C.uint(n / C.sizeof_float), C.PROJECTM_STEREO)
C.projectm_pcm_add_float(handle, (*C.float)(ptr), C.uint(n/C.sizeof_float), C.PROJECTM_STEREO)
C.projectm_opengl_render_frame(handle)
window.GLSwap()