voicemeeter 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0f55435d4652f6d91df3f6255a410ab906989c2f996159e9f3dca99af4a5e56d
4
- data.tar.gz: 9b65ecc40b287b9d6dc65a9becfb89cb5f210b9c34aa2b18408cf2741045ada0
3
+ metadata.gz: e3b54899e83b3462fbe37aeaf0650998d5071de096e10ffbab7175fe72ae8d7a
4
+ data.tar.gz: 6383c43139954ff774b74b8d1566c233ae4939021b99071422473765295d0c62
5
5
  SHA512:
6
- metadata.gz: 6beffc9ce32f955be64359cbed4203dcef40ba8eac7a2a04770f1a74debd34123ac309e6688edf859f2a5e4b2b2df13c3a2b0a1ab97bbf9b2f0b4a1397b39d83
7
- data.tar.gz: 2d72c6b775c0dcf87bba24e98a189f07b7e3f71a661cd278a860f428a0895436651003f7a76fe6159dad73f338a3ec94a9469b36d6c67dc04eb8ba89fbeb02e7
6
+ metadata.gz: 886a45d632d42562b743123c5f19b7127d7655aa49b708cb2f0aa748db8fea6367f78f9c5719b7c11a8a0acb9ddaea2b4d94442720897d536cb305c3fb1c03f9
7
+ data.tar.gz: '08de65bd94561a463f457eeefee2badf434b3720a5121f8123e6c709c9c60cab10a8ac75deca54f307bdd428c0d9f528b4abdf80b83b5793309d42a824ad26e3'
data/CHANGELOG.md CHANGED
@@ -11,6 +11,18 @@ Before any major/minor/patch is released all unit tests will be run to verify th
11
11
 
12
12
  - [ ]
13
13
 
14
+ ## [1.1.0] - 2023-06-28
15
+
16
+ ### Added
17
+
18
+ - Configurable kwarg `login_timeout`, defaults to 2s.
19
+
20
+ ## [1.0.1] - 2023-09-14
21
+
22
+ ### Added
23
+
24
+ - BusDevice added to Bus class.
25
+
14
26
  ## [1.0.0] - 2023-09-01
15
27
 
16
28
  ### Added
@@ -23,6 +35,6 @@ Before any major/minor/patch is released all unit tests will be run to verify th
23
35
  - `ldirty`: channel level updates
24
36
  - An entry point for fetching a Remote class for each kind of Voicemeeter (basic, banana, potato)
25
37
  - Logging system for reading messages sent by getters and setters.
26
- - Strip class refinement in util.rb. It's scope should be limited to the CBindings module.
38
+ - String class refinement in util.rb. It's scope should be limited to the CBindings module.
27
39
  - rbs type signatures but some of them need updating.
28
40
  - example user profile configs included with repo.
data/README.md CHANGED
@@ -1,5 +1,6 @@
1
+ [![Gem Version][gem version]](https://badge.fury.io/rb/voicemeeter)
1
2
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)][license]
2
- [![Ruby Code Style](https://img.shields.io/badge/code_style-standard-violet.svg)](https://github.com/standardrb/standard)
3
+ [![Ruby Code Style][code style]](https://github.com/standardrb/standard)
3
4
 
4
5
  # Ruby Wrapper Around the Voicemeeter Remote API
5
6
 
@@ -9,9 +10,9 @@ For an outline of past/future changes refer to: [CHANGELOG](CHANGELOG.md)
9
10
 
10
11
  ## Tested against
11
12
 
12
- - Basic 1.0.8.8
13
- - Banana 2.0.6.8
14
- - Potato 3.0.2.8
13
+ - Basic 1.1.1.1
14
+ - Banana 2.1.1.1
15
+ - Potato 3.1.1.1
15
16
 
16
17
  ## Requirements
17
18
 
@@ -197,7 +198,7 @@ The following attributes are available.
197
198
  example:
198
199
 
199
200
  ```ruby
200
- vm.strip[0].eq.ab = True
201
+ vm.strip[0].eq.ab = true
201
202
  ```
202
203
 
203
204
  Strip EQ parameters are defined for PhysicalStrips, potato version only.
@@ -457,7 +458,7 @@ vm.command.showvbanchat = true
457
458
  example:
458
459
 
459
460
  ```ruby
460
- vm.run { (0...vm.device.ins).each { puts vm.device.input(_1) } }
461
+ vm.run { |vm| (0...vm.device.ins).each { puts vm.device.input(_1) } }
461
462
  ```
462
463
 
463
464
  ### FX
@@ -629,7 +630,7 @@ vm.vban.outstream[0].apply(on: true, name: "streamname", bit: 24)
629
630
 
630
631
  `vm.apply_config(<configname>)`
631
632
 
632
- You may load config files in TOML format.
633
+ You may load config files in YAML format.
633
634
  Three example configs have been included with the package. Remember to save
634
635
  current settings before loading a config. To set one you may do:
635
636
 
@@ -638,7 +639,7 @@ require "voicemeeter"
638
639
  Voicemeeter::Remote.new(:banana).run { |vm| vm.apply_config(:example) }
639
640
  ```
640
641
 
641
- will load a config file at mydir/configs/banana/example.toml for Voicemeeter Banana.
642
+ will load a config file at mydir/configs/banana/example.yml for Voicemeeter Banana.
642
643
 
643
644
  ## Events
644
645
 
@@ -749,7 +750,7 @@ vm.set("Strip[0].Gain", -3.6)
749
750
  - The following attributes are available:
750
751
  - `fn_name`: name of the C-API function that failed.
751
752
  - `code`: error code.
752
- - For a full list of error codes [check the VoicemeeterRemote header file][voicemeeter remote header].
753
+ - For a full list of error codes check the [VoicemeeterRemote header file][voicemeeter remote header].
753
754
 
754
755
  ### Logging
755
756
 
@@ -771,7 +772,9 @@ Bundle exec rake
771
772
 
772
773
  ### Official Documentation
773
774
 
774
- - [Voicemeeter Remote C API](https://github.com/onyx-and-iris/Voicemeeter-SDK/blob/update-docs/VoicemeeterRemoteAPI.pdf)
775
+ - [Voicemeeter Remote C API](https://github.com/onyx-and-iris/Voicemeeter-SDK/blob/main/VoicemeeterRemoteAPI.pdf)
775
776
 
776
777
  [license]: https://github.com/onyx-and-iris/voicemeeter-rb/blob/dev/LICENSE
777
- [voicemeeter remote header]: https://github.com/onyx-and-iris/Voicemeeter-SDK/blob/update-docs/VoicemeeterRemote.h
778
+ [voicemeeter remote header]: https://github.com/onyx-and-iris/Voicemeeter-SDK/blob/main/VoicemeeterRemote.h
779
+ [code style]: https://img.shields.io/badge/code_style-standard-violet.svg
780
+ [gem version]: https://badge.fury.io/rb/voicemeeter.svg
@@ -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
@@ -7,7 +7,7 @@ module Voicemeeter
7
7
  include Mixins::Return
8
8
  extend MetaFunctions
9
9
 
10
- attr_reader :eq, :mode, :levels
10
+ attr_reader :eq, :mode, :levels, :device
11
11
  attr_accessor_bool :mute, :mono, :sel, :monitor
12
12
  attr_accessor_float :gain
13
13
  attr_accessor_string :label
@@ -21,6 +21,7 @@ module Voicemeeter
21
21
  @eq = BusEq.new(remote, i)
22
22
  @mode = BusModes.new(remote, i)
23
23
  @levels = BusLevels.new(remote, i)
24
+ @device = BusDevice.new(remote, i)
24
25
  end
25
26
 
26
27
  def identifier
@@ -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
@@ -7,7 +7,7 @@ module Voicemeeter
7
7
  end
8
8
 
9
9
  def minor
10
- 0
10
+ 1
11
11
  end
12
12
 
13
13
  def patch
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.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: 2023-08-31 00:00:00.000000000 Z
11
+ date: 2024-06-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi