voicemeeter 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +8 -8
- data/lib/voicemeeter/base.rb +3 -3
- data/lib/voicemeeter/util.rb +20 -0
- data/lib/voicemeeter/version.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e3b54899e83b3462fbe37aeaf0650998d5071de096e10ffbab7175fe72ae8d7a
|
4
|
+
data.tar.gz: 6383c43139954ff774b74b8d1566c233ae4939021b99071422473765295d0c62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 886a45d632d42562b743123c5f19b7127d7655aa49b708cb2f0aa748db8fea6367f78f9c5719b7c11a8a0acb9ddaea2b4d94442720897d536cb305c3fb1c03f9
|
7
|
+
data.tar.gz: '08de65bd94561a463f457eeefee2badf434b3720a5121f8123e6c709c9c60cab10a8ac75deca54f307bdd428c0d9f528b4abdf80b83b5793309d42a824ad26e3'
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -10,9 +10,9 @@ For an outline of past/future changes refer to: [CHANGELOG](CHANGELOG.md)
|
|
10
10
|
|
11
11
|
## Tested against
|
12
12
|
|
13
|
-
- Basic 1.
|
14
|
-
- Banana 2.
|
15
|
-
- Potato 3.
|
13
|
+
- Basic 1.1.1.1
|
14
|
+
- Banana 2.1.1.1
|
15
|
+
- Potato 3.1.1.1
|
16
16
|
|
17
17
|
## Requirements
|
18
18
|
|
@@ -630,7 +630,7 @@ vm.vban.outstream[0].apply(on: true, name: "streamname", bit: 24)
|
|
630
630
|
|
631
631
|
`vm.apply_config(<configname>)`
|
632
632
|
|
633
|
-
You may load config files in
|
633
|
+
You may load config files in YAML format.
|
634
634
|
Three example configs have been included with the package. Remember to save
|
635
635
|
current settings before loading a config. To set one you may do:
|
636
636
|
|
@@ -639,7 +639,7 @@ require "voicemeeter"
|
|
639
639
|
Voicemeeter::Remote.new(:banana).run { |vm| vm.apply_config(:example) }
|
640
640
|
```
|
641
641
|
|
642
|
-
will load a config file at mydir/configs/banana/example.
|
642
|
+
will load a config file at mydir/configs/banana/example.yml for Voicemeeter Banana.
|
643
643
|
|
644
644
|
## Events
|
645
645
|
|
@@ -750,7 +750,7 @@ vm.set("Strip[0].Gain", -3.6)
|
|
750
750
|
- The following attributes are available:
|
751
751
|
- `fn_name`: name of the C-API function that failed.
|
752
752
|
- `code`: error code.
|
753
|
-
- For a full list of error codes
|
753
|
+
- For a full list of error codes check the [VoicemeeterRemote header file][voicemeeter remote header].
|
754
754
|
|
755
755
|
### Logging
|
756
756
|
|
@@ -772,9 +772,9 @@ Bundle exec rake
|
|
772
772
|
|
773
773
|
### Official Documentation
|
774
774
|
|
775
|
-
- [Voicemeeter Remote C API](https://github.com/onyx-and-iris/Voicemeeter-SDK/blob/
|
775
|
+
- [Voicemeeter Remote C API](https://github.com/onyx-and-iris/Voicemeeter-SDK/blob/main/VoicemeeterRemoteAPI.pdf)
|
776
776
|
|
777
777
|
[license]: https://github.com/onyx-and-iris/voicemeeter-rb/blob/dev/LICENSE
|
778
|
-
[voicemeeter remote header]: https://github.com/onyx-and-iris/Voicemeeter-SDK/blob/
|
778
|
+
[voicemeeter remote header]: https://github.com/onyx-and-iris/Voicemeeter-SDK/blob/main/VoicemeeterRemote.h
|
779
779
|
[code style]: https://img.shields.io/badge/code_style-standard-violet.svg
|
780
780
|
[gem version]: https://badge.fury.io/rb/voicemeeter.svg
|
data/lib/voicemeeter/base.rb
CHANGED
@@ -4,18 +4,21 @@ module Voicemeeter
|
|
4
4
|
include Logging
|
5
5
|
include Worker
|
6
6
|
include Events::Director
|
7
|
+
prepend Util::Timeout
|
7
8
|
prepend Util::Cache
|
8
9
|
|
9
10
|
attr_reader :kind, :midi, :event, :delay, :cache
|
10
11
|
|
11
12
|
RATELIMIT = 0.033
|
12
13
|
DELAY = 0.001
|
14
|
+
LOGIN_TIMEOUT = 2
|
13
15
|
|
14
16
|
def initialize(kind, **kwargs)
|
15
17
|
@kind = kind
|
16
18
|
@sync = kwargs[:sync] || false
|
17
19
|
@ratelimit = kwargs[:ratelimit] || RATELIMIT
|
18
20
|
@delay = kwargs[:delay] || DELAY
|
21
|
+
@login_timeout = kwargs[:login_timeout] || LOGIN_TIMEOUT
|
19
22
|
@event =
|
20
23
|
Events::Tracker.new(
|
21
24
|
**(kwargs.select { |k, _| %i[pdirty mdirty ldirty midi].include? k })
|
@@ -30,8 +33,6 @@ module Voicemeeter
|
|
30
33
|
|
31
34
|
def login
|
32
35
|
CBindings.call(:bind_login, ok: [0, 1]) == 1 and run_voicemeeter(kind.name)
|
33
|
-
clear_dirty
|
34
|
-
logger.info "Successfully logged into #{self} version #{version}"
|
35
36
|
end
|
36
37
|
|
37
38
|
def logout
|
@@ -72,7 +73,6 @@ module Voicemeeter
|
|
72
73
|
logger.debug "Voicemeeter engine running but the GUI appears to be down... launching."
|
73
74
|
end
|
74
75
|
CBindings.call(:bind_run_voicemeeter, kinds[kind_id])
|
75
|
-
sleep(1)
|
76
76
|
end
|
77
77
|
|
78
78
|
def type
|
data/lib/voicemeeter/util.rb
CHANGED
@@ -18,6 +18,26 @@ module Voicemeeter
|
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
|
+
module Timeout
|
22
|
+
def login
|
23
|
+
super
|
24
|
+
|
25
|
+
err = nil
|
26
|
+
start = Time.now
|
27
|
+
begin
|
28
|
+
sleep 0.1
|
29
|
+
logger.info "Successfully logged into #{self} version #{version}"
|
30
|
+
logger.debug "login time: #{(Time.now - start).round(2)}"
|
31
|
+
err = nil
|
32
|
+
rescue Errors::VMCAPIError => e
|
33
|
+
err = e
|
34
|
+
retry if Time.now < start + @login_timeout
|
35
|
+
end
|
36
|
+
raise Errors::VMError.new "Timeout logging into the api" if err
|
37
|
+
clear_dirty
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
21
41
|
module Cache
|
22
42
|
def get(name, is_string = false)
|
23
43
|
return cache.delete(name) if cache.key? name
|
data/lib/voicemeeter/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: voicemeeter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- onyx_online
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-06-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|