mirror of
https://github.com/onyx-and-iris/voicemeeter.git
synced 2026-04-18 05:23:31 +00:00
package module moved into root of repository.
example in readme updated. level pooler implemented, runs in its own goroutine. Remote type now exported observers example updated.
This commit is contained in:
44
device.go
Normal file
44
device.go
Normal file
@@ -0,0 +1,44 @@
|
||||
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(get_num_devices("in"))
|
||||
}
|
||||
|
||||
// Ins returns the total number of physical input devices
|
||||
func (d *device) Outs() int {
|
||||
return int(get_num_devices("out"))
|
||||
}
|
||||
|
||||
func (d *device) Input(i int) devDesc {
|
||||
n, t_, id := get_device_description(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 := get_device_description(i, "out")
|
||||
vals := map[uint64]string{
|
||||
1: "mme",
|
||||
3: "wdm",
|
||||
4: "ks",
|
||||
5: "asio",
|
||||
}
|
||||
return devDesc{Name: n, Type: vals[t_], Hwid: id}
|
||||
}
|
||||
Reference in New Issue
Block a user