mirror of
https://github.com/onyx-and-iris/voicemeeter.git
synced 2024-11-15 17:40:51 +00:00
prepend all bindings with vm
This commit is contained in:
parent
cb68b8acec
commit
751200951b
@ -19,23 +19,23 @@ var (
|
|||||||
vmGetvmType = mod.NewProc("VBVMR_GetVoicemeeterType")
|
vmGetvmType = mod.NewProc("VBVMR_GetVoicemeeterType")
|
||||||
vmGetvmVersion = mod.NewProc("VBVMR_GetVoicemeeterVersion")
|
vmGetvmVersion = mod.NewProc("VBVMR_GetVoicemeeterVersion")
|
||||||
vmPdirty = mod.NewProc("VBVMR_IsParametersDirty")
|
vmPdirty = mod.NewProc("VBVMR_IsParametersDirty")
|
||||||
getParamFloat = mod.NewProc("VBVMR_GetParameterFloat")
|
vmGetParamFloat = mod.NewProc("VBVMR_GetParameterFloat")
|
||||||
getParamString = mod.NewProc("VBVMR_GetParameterStringA")
|
vmGetParamString = mod.NewProc("VBVMR_GetParameterStringA")
|
||||||
|
|
||||||
//getLevelFloat = mod.NewProc("VBVMR_GetLevel")
|
//vmGetLevelFloat = mod.NewProc("VBVMR_GetLevel")
|
||||||
|
|
||||||
setParamFloat = mod.NewProc("VBVMR_SetParameterFloat")
|
vmSetParamFloat = mod.NewProc("VBVMR_SetParameterFloat")
|
||||||
setParameters = mod.NewProc("VBVMR_SetParameters")
|
vmSetParameters = mod.NewProc("VBVMR_SetParameters")
|
||||||
setParamString = mod.NewProc("VBVMR_SetParameterStringA")
|
vmSetParamString = mod.NewProc("VBVMR_SetParameterStringA")
|
||||||
|
|
||||||
//getDevNumOut = mod.NewProc("VBVMR_Output_GetDeviceNumber")
|
//vmGetDevNumOut = mod.NewProc("VBVMR_Output_GetDeviceNumber")
|
||||||
//getDevDescOut = mod.NewProc("VBVMR_Output_GetDeviceDescA")
|
//vmGetDevDescOut = mod.NewProc("VBVMR_Output_GetDeviceDescA")
|
||||||
//getDevNumIn = mod.NewProc("VBVMR_Input_GetDeviceNumber")
|
//vmGetDevNumIn = mod.NewProc("VBVMR_Input_GetDeviceNumber")
|
||||||
//getDevDescIn = mod.NewProc("VBVMR_Input_GetDeviceDescA")
|
//vmGetDevDescIn = mod.NewProc("VBVMR_Input_GetDeviceDescA")
|
||||||
|
|
||||||
vmMdirty = mod.NewProc("VBVMR_MacroButton_IsDirty")
|
vmMdirty = mod.NewProc("VBVMR_MacroButton_IsDirty")
|
||||||
getMacroButtonStatus = mod.NewProc("VBVMR_MacroButton_GetStatus")
|
vmGetMacroStatus = mod.NewProc("VBVMR_MacroButton_GetStatus")
|
||||||
setMacroButtonStatus = mod.NewProc("VBVMR_MacroButton_SetStatus")
|
vmSetMacroStatus = mod.NewProc("VBVMR_MacroButton_SetStatus")
|
||||||
)
|
)
|
||||||
|
|
||||||
// login logs into the API,
|
// login logs into the API,
|
||||||
@ -139,7 +139,7 @@ func getVMType() string {
|
|||||||
func getParameterFloat(name string) float64 {
|
func getParameterFloat(name string) float64 {
|
||||||
var value float32
|
var value float32
|
||||||
b := append([]byte(name), 0)
|
b := append([]byte(name), 0)
|
||||||
res, _, _ := getParamFloat.Call(
|
res, _, _ := vmGetParamFloat.Call(
|
||||||
uintptr(unsafe.Pointer(&b[0])),
|
uintptr(unsafe.Pointer(&b[0])),
|
||||||
uintptr(unsafe.Pointer(&value)),
|
uintptr(unsafe.Pointer(&value)),
|
||||||
)
|
)
|
||||||
@ -155,7 +155,7 @@ func getParameterFloat(name string) float64 {
|
|||||||
func setParameterFloat(name string, value float32) {
|
func setParameterFloat(name string, value float32) {
|
||||||
b1 := append([]byte(name), 0)
|
b1 := append([]byte(name), 0)
|
||||||
b2 := math.Float32bits(value)
|
b2 := math.Float32bits(value)
|
||||||
res, _, _ := setParamFloat.Call(
|
res, _, _ := vmSetParamFloat.Call(
|
||||||
uintptr(unsafe.Pointer(&b1[0])),
|
uintptr(unsafe.Pointer(&b1[0])),
|
||||||
uintptr(b2),
|
uintptr(b2),
|
||||||
)
|
)
|
||||||
@ -171,7 +171,7 @@ func setParameterFloat(name string, value float32) {
|
|||||||
func getParameterString(name string) string {
|
func getParameterString(name string) string {
|
||||||
b1 := append([]byte(name), 0)
|
b1 := append([]byte(name), 0)
|
||||||
var b2 [512]byte
|
var b2 [512]byte
|
||||||
res, _, _ := getParamString.Call(
|
res, _, _ := vmGetParamString.Call(
|
||||||
uintptr(unsafe.Pointer(&b1[0])),
|
uintptr(unsafe.Pointer(&b1[0])),
|
||||||
uintptr(unsafe.Pointer(&b2[0])),
|
uintptr(unsafe.Pointer(&b2[0])),
|
||||||
)
|
)
|
||||||
@ -188,7 +188,7 @@ func getParameterString(name string) string {
|
|||||||
func setParameterString(name, value string) {
|
func setParameterString(name, value string) {
|
||||||
b1 := append([]byte(name), 0)
|
b1 := append([]byte(name), 0)
|
||||||
b2 := append([]byte(value), 0)
|
b2 := append([]byte(value), 0)
|
||||||
res, _, _ := setParamString.Call(
|
res, _, _ := vmSetParamString.Call(
|
||||||
uintptr(unsafe.Pointer(&b1[0])),
|
uintptr(unsafe.Pointer(&b1[0])),
|
||||||
uintptr(unsafe.Pointer(&b2[0])),
|
uintptr(unsafe.Pointer(&b2[0])),
|
||||||
)
|
)
|
||||||
@ -203,7 +203,7 @@ func setParameterString(name, value string) {
|
|||||||
// setParametersMulti sets multiple parameters with a script
|
// setParametersMulti sets multiple parameters with a script
|
||||||
func setParametersMulti(script string) {
|
func setParametersMulti(script string) {
|
||||||
b1 := append([]byte(script), 0)
|
b1 := append([]byte(script), 0)
|
||||||
res, _, _ := setParameters.Call(
|
res, _, _ := vmSetParameters.Call(
|
||||||
uintptr(unsafe.Pointer(&b1[0])),
|
uintptr(unsafe.Pointer(&b1[0])),
|
||||||
)
|
)
|
||||||
if res != 0 {
|
if res != 0 {
|
||||||
@ -216,7 +216,7 @@ func setParametersMulti(script string) {
|
|||||||
// getMacroStatus gets a macrobutton value
|
// getMacroStatus gets a macrobutton value
|
||||||
func getMacroStatus(id, mode int) float32 {
|
func getMacroStatus(id, mode int) float32 {
|
||||||
var state float32
|
var state float32
|
||||||
res, _, _ := getMacroButtonStatus.Call(
|
res, _, _ := vmGetMacroStatus.Call(
|
||||||
uintptr(id),
|
uintptr(id),
|
||||||
uintptr(unsafe.Pointer(&state)),
|
uintptr(unsafe.Pointer(&state)),
|
||||||
uintptr(mode),
|
uintptr(mode),
|
||||||
@ -231,7 +231,7 @@ func getMacroStatus(id, mode int) float32 {
|
|||||||
|
|
||||||
// setMacroStatus sets a macrobutton value
|
// setMacroStatus sets a macrobutton value
|
||||||
func setMacroStatus(id, state, mode int) {
|
func setMacroStatus(id, state, mode int) {
|
||||||
res, _, _ := setMacroButtonStatus.Call(
|
res, _, _ := vmSetMacroStatus.Call(
|
||||||
uintptr(id),
|
uintptr(id),
|
||||||
uintptr(state),
|
uintptr(state),
|
||||||
uintptr(mode),
|
uintptr(mode),
|
||||||
|
Loading…
Reference in New Issue
Block a user