mirror of
https://github.com/onyx-and-iris/voicemeeter-rb.git
synced 2024-11-21 09:30:46 +00:00
make docstrings rdoc compatible
This commit is contained in:
parent
84ba47843a
commit
330a1507c9
3
.gitignore
vendored
3
.gitignore
vendored
@ -56,6 +56,9 @@ Gemfile.lock
|
||||
# Used by RuboCop. Remote config files pulled in from inherit_from directive.
|
||||
# .rubocop-https?--*
|
||||
|
||||
# documentation
|
||||
doc/
|
||||
|
||||
# test
|
||||
quick.rb
|
||||
config.yaml
|
||||
|
@ -35,16 +35,17 @@ require_relative "voicemeeter/version"
|
||||
|
||||
module Voicemeeter
|
||||
module Errors
|
||||
class VMError < StandardError; end
|
||||
# Base Voicemeeter error class
|
||||
class VMError < StandardError; end
|
||||
|
||||
# Raised when errors occur during installation.
|
||||
class VMInstallError < VMError; end
|
||||
# Errors raised during installation.
|
||||
|
||||
# Raised when the C-API returns error codes
|
||||
class VMCAPIError < VMError
|
||||
# Errors raised when the C-API returns error codes
|
||||
attr_reader :fn_name, :code
|
||||
|
||||
# create a new VMCAPIError with given C-API function name and error code
|
||||
def initialize(fn_name, code)
|
||||
@fn_name = fn_name
|
||||
@code = code
|
||||
|
@ -1,6 +1,6 @@
|
||||
module Voicemeeter
|
||||
class Base
|
||||
# Base class for Remote types
|
||||
class Base
|
||||
include Logging
|
||||
include Worker
|
||||
include Events::Director
|
||||
|
@ -1,7 +1,7 @@
|
||||
module Voicemeeter
|
||||
module Bus
|
||||
class Base
|
||||
# Base class for Bus types
|
||||
class Base
|
||||
include IRemote
|
||||
include Mixins::Fades
|
||||
include Mixins::Return
|
||||
@ -28,11 +28,11 @@ module Voicemeeter
|
||||
end
|
||||
end
|
||||
|
||||
class PhysicalBus < Base; end
|
||||
# Represents a Physical Bus
|
||||
class PhysicalBus < Base; end
|
||||
|
||||
class VirtualBus < Base; end
|
||||
# Represents a Virtual Bus
|
||||
class VirtualBus < Base; end
|
||||
|
||||
class BusEq
|
||||
include IRemote
|
||||
|
@ -26,8 +26,8 @@ module Voicemeeter
|
||||
end
|
||||
end
|
||||
|
||||
class Base
|
||||
# Base class for Button types
|
||||
class Base
|
||||
include Logging
|
||||
include IRemote
|
||||
include ButtonColorMixin
|
||||
|
@ -1,7 +1,6 @@
|
||||
module Voicemeeter
|
||||
module CBindings
|
||||
# Ruby bindings for the C-API functions
|
||||
|
||||
module CBindings
|
||||
private
|
||||
|
||||
extend Logging
|
||||
|
@ -12,7 +12,6 @@ module Voicemeeter
|
||||
eq = [:eq].to_h { |param| [param, {on: false}] }
|
||||
|
||||
overrides = {B1: true}
|
||||
# physical strip params
|
||||
phys_strip =
|
||||
(0...kind.phys_in).to_h do |i|
|
||||
[
|
||||
@ -22,7 +21,6 @@ module Voicemeeter
|
||||
end
|
||||
|
||||
overrides = {A1: true}
|
||||
# virtual strip params
|
||||
virt_strip =
|
||||
(kind.phys_in...kind.phys_in + kind.virt_in).to_h do |i|
|
||||
[
|
||||
|
@ -1,7 +1,6 @@
|
||||
module Voicemeeter
|
||||
# Common interface with the base Remote class.
|
||||
module IRemote
|
||||
# A commmon interface between the base Remote class and extended classes.
|
||||
|
||||
include Logging
|
||||
include MetaFunctions
|
||||
|
||||
|
@ -1,7 +1,5 @@
|
||||
module Voicemeeter
|
||||
module Kinds
|
||||
# KindMaps that describe the layout for each kind
|
||||
|
||||
private
|
||||
|
||||
module KindEnum
|
||||
|
@ -1,7 +1,7 @@
|
||||
module Voicemeeter
|
||||
module Patch
|
||||
class Base
|
||||
# Base class for Patch types
|
||||
class Base
|
||||
include IRemote
|
||||
attr_reader :asio, :A2, :A3, :A4, :A5, :composite, :insert
|
||||
|
||||
|
@ -7,8 +7,8 @@ module Voicemeeter
|
||||
MP3 = 100
|
||||
end
|
||||
|
||||
class Base
|
||||
# Base class for Recorder types
|
||||
class Base
|
||||
include IRemote
|
||||
include Mixins::Outputs
|
||||
|
||||
|
@ -1,9 +1,6 @@
|
||||
module Voicemeeter
|
||||
module Builder
|
||||
# Builder module for Remote factories.
|
||||
# Defines steps for building a Remote type of a kind.
|
||||
# Defines the base director
|
||||
|
||||
module Builder
|
||||
private
|
||||
|
||||
def steps(step)
|
||||
@ -29,8 +26,8 @@ module Voicemeeter
|
||||
module Remote
|
||||
extend Logging
|
||||
|
||||
class Remote < Base
|
||||
# Concrete class for Remote types
|
||||
class Remote < Base
|
||||
include Builder
|
||||
|
||||
public attr_reader :strip, :bus, :button, :vban, :command, :device, :option
|
||||
@ -57,11 +54,11 @@ module Voicemeeter
|
||||
end
|
||||
end
|
||||
|
||||
class RemoteBasic < Remote; end
|
||||
# Represents a RemoteBasic type
|
||||
class RemoteBasic < Remote; end
|
||||
|
||||
class RemoteBanana < Remote
|
||||
# Represents a RemoteBanana type
|
||||
class RemoteBanana < Remote
|
||||
public attr_reader :recorder, :patch
|
||||
|
||||
private def director
|
||||
@ -69,8 +66,8 @@ module Voicemeeter
|
||||
end
|
||||
end
|
||||
|
||||
class RemotePotato < Remote
|
||||
# Represents a RemotePotato type
|
||||
class RemotePotato < Remote
|
||||
public attr_reader :recorder, :patch, :fx
|
||||
|
||||
private def director
|
||||
@ -78,8 +75,8 @@ module Voicemeeter
|
||||
end
|
||||
end
|
||||
|
||||
class RequestRemote
|
||||
# Factory class for Remote types. Returns a Remote class of a kind.
|
||||
class RequestRemote
|
||||
def self.for(kind, **)
|
||||
case kind.name
|
||||
when :basic
|
||||
@ -92,8 +89,8 @@ module Voicemeeter
|
||||
end
|
||||
end
|
||||
|
||||
def self.new(kind_id, **)
|
||||
# Interface entry point. Wraps factory class and handles kind errors.
|
||||
def self.new(kind_id, **)
|
||||
kind = Kinds.get(kind_id)
|
||||
rescue KeyError => e
|
||||
logger.error "#{e.class.name}: #{e.message}"
|
||||
|
@ -1,7 +1,7 @@
|
||||
module Voicemeeter
|
||||
module Strip
|
||||
class Base
|
||||
# Base class for Strip types
|
||||
class Base
|
||||
include IRemote
|
||||
include Mixins::Outputs
|
||||
include Mixins::Fades
|
||||
@ -28,8 +28,8 @@ module Voicemeeter
|
||||
end
|
||||
end
|
||||
|
||||
class PhysicalStrip < Base
|
||||
# Represents a Physical Strip
|
||||
class PhysicalStrip < Base
|
||||
include Mixins::Xy::Pan
|
||||
include Mixins::Xy::Color
|
||||
include Mixins::Xy::Fx
|
||||
@ -143,8 +143,8 @@ module Voicemeeter
|
||||
end
|
||||
end
|
||||
|
||||
class VirtualStrip < Base
|
||||
# Represents a Virtual Strip
|
||||
class VirtualStrip < Base
|
||||
include Mixins::Xy::Pan
|
||||
include Mixins::Apps
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
module Voicemeeter
|
||||
module Vban
|
||||
class VbanStream
|
||||
# Base class for Vban Stream types
|
||||
class VbanStream
|
||||
include IRemote
|
||||
|
||||
def initialize(remote, i)
|
||||
@ -20,8 +20,8 @@ module Voicemeeter
|
||||
end
|
||||
end
|
||||
|
||||
class VbanInstream < VbanStream
|
||||
# Represents a Vban InStream
|
||||
class VbanInstream < VbanStream
|
||||
def initialize(remote, i)
|
||||
super
|
||||
make_reader_int :sr, :channel, :bit
|
||||
@ -32,17 +32,17 @@ module Voicemeeter
|
||||
end
|
||||
end
|
||||
|
||||
class VbanAudioInstream < VbanInstream; end
|
||||
# Represents a Vban Audio InStream
|
||||
class VbanAudioInstream < VbanInstream; end
|
||||
|
||||
class VbanMidiInstream < VbanInstream; end
|
||||
# Represents a Vban Midi InStream
|
||||
class VbanMidiInstream < VbanInstream; end
|
||||
|
||||
class VbanTextInstream < VbanInstream; end
|
||||
# Represents a Vban Text InStream
|
||||
class VbanTextInstream < VbanInstream; end
|
||||
|
||||
class VbanOutstream < VbanStream
|
||||
# Represents a Vban OutStream
|
||||
class VbanOutstream < VbanStream
|
||||
def initialize(remote, i)
|
||||
super
|
||||
make_accessor_int :sr, :channel, :bit
|
||||
@ -53,11 +53,11 @@ module Voicemeeter
|
||||
end
|
||||
end
|
||||
|
||||
class VbanAudioOutstream < VbanOutstream; end
|
||||
# Represents a Vban Audio OutStream
|
||||
class VbanAudioOutstream < VbanOutstream; end
|
||||
|
||||
class VbanMidiOutstream < VbanOutstream; end
|
||||
# Represents a Vban Midi OutStream
|
||||
class VbanMidiOutstream < VbanOutstream; end
|
||||
|
||||
class RequestVbanStream
|
||||
def self.for(remote, i, dir)
|
||||
@ -81,8 +81,8 @@ module Voicemeeter
|
||||
end
|
||||
end
|
||||
|
||||
class Base
|
||||
# Base class for Vban type
|
||||
class Base
|
||||
attr_reader :instream, :outstream
|
||||
|
||||
def initialize(remote)
|
||||
|
@ -1,7 +1,5 @@
|
||||
module Voicemeeter
|
||||
module Worker
|
||||
# Event threads, provides updates to observers
|
||||
|
||||
include Logging
|
||||
|
||||
private
|
||||
@ -48,7 +46,7 @@ module Voicemeeter
|
||||
public
|
||||
|
||||
def running?
|
||||
@producer&.alive? # safe navigation
|
||||
@producer&.alive?
|
||||
end
|
||||
|
||||
def init_event_threads
|
||||
|
Loading…
Reference in New Issue
Block a user