mirror of
https://github.com/onyx-and-iris/voicemeeter.git
synced 2024-11-15 17:40:51 +00:00
1efac19b12
CHANGELOG first update pre-commit updated to look in root of repo. version retraction added to go.mod README updated to reflect changes
45 lines
826 B
Go
45 lines
826 B
Go
package voicemeeter
|
|
|
|
type devDesc struct {
|
|
Name, Type, Hwid string
|
|
}
|
|
|
|
type device struct {
|
|
}
|
|
|
|
func newDevice() *device {
|
|
return &device{}
|
|
}
|
|
|
|
// Ins returns the total number of physical input devices
|
|
func (d *device) Ins() int {
|
|
return int(getNumDevices("in"))
|
|
}
|
|
|
|
// Ins returns the total number of physical input devices
|
|
func (d *device) Outs() int {
|
|
return int(getNumDevices("out"))
|
|
}
|
|
|
|
func (d *device) Input(i int) devDesc {
|
|
n, t_, id := getDeviceDescription(i, "in")
|
|
vals := map[uint64]string{
|
|
1: "mme",
|
|
3: "wdm",
|
|
4: "ks",
|
|
5: "asio",
|
|
}
|
|
return devDesc{Name: n, Type: vals[t_], Hwid: id}
|
|
}
|
|
|
|
func (d *device) Output(i int) devDesc {
|
|
n, t_, id := getDeviceDescription(i, "out")
|
|
vals := map[uint64]string{
|
|
1: "mme",
|
|
3: "wdm",
|
|
4: "ks",
|
|
5: "asio",
|
|
}
|
|
return devDesc{Name: n, Type: vals[t_], Hwid: id}
|
|
}
|