2023-08-11 00:49:59 +01:00
|
|
|
require "yaml"
|
|
|
|
require "pathname"
|
|
|
|
require "win32/registry"
|
|
|
|
require "ffi"
|
|
|
|
require "date"
|
|
|
|
require "logger"
|
|
|
|
|
|
|
|
require_relative "voicemeeter/logger"
|
|
|
|
require_relative "voicemeeter/worker"
|
|
|
|
require_relative "voicemeeter/event"
|
|
|
|
require_relative "voicemeeter/util"
|
|
|
|
require_relative "voicemeeter/meta"
|
|
|
|
require_relative "voicemeeter/iremote"
|
|
|
|
require_relative "voicemeeter/mixins"
|
|
|
|
require_relative "voicemeeter/install"
|
|
|
|
|
|
|
|
require_relative "voicemeeter/base"
|
|
|
|
require_relative "voicemeeter/bus"
|
|
|
|
require_relative "voicemeeter/button"
|
|
|
|
require_relative "voicemeeter/cbindings"
|
|
|
|
require_relative "voicemeeter/command"
|
|
|
|
require_relative "voicemeeter/configs"
|
|
|
|
require_relative "voicemeeter/device"
|
|
|
|
require_relative "voicemeeter/fx"
|
|
|
|
require_relative "voicemeeter/kinds"
|
|
|
|
require_relative "voicemeeter/midi"
|
|
|
|
require_relative "voicemeeter/option"
|
|
|
|
require_relative "voicemeeter/patch"
|
|
|
|
require_relative "voicemeeter/recorder"
|
2023-07-07 02:38:13 +01:00
|
|
|
require_relative "voicemeeter/remote"
|
2023-08-11 00:49:59 +01:00
|
|
|
require_relative "voicemeeter/strip"
|
|
|
|
require_relative "voicemeeter/vban"
|
2023-07-07 02:38:13 +01:00
|
|
|
|
2023-08-11 02:18:29 +01:00
|
|
|
require_relative "voicemeeter/version"
|
|
|
|
|
2023-07-07 02:38:13 +01:00
|
|
|
module Voicemeeter
|
2023-08-11 02:18:29 +01:00
|
|
|
module Errors
|
|
|
|
# Base Voicemeeter error class
|
2023-08-29 11:21:05 +01:00
|
|
|
class VMError < StandardError; end
|
2023-08-11 02:18:29 +01:00
|
|
|
|
2023-08-29 11:21:05 +01:00
|
|
|
# Raised when errors occur during installation.
|
2023-08-11 02:18:29 +01:00
|
|
|
class VMInstallError < VMError; end
|
|
|
|
|
2023-08-29 11:21:05 +01:00
|
|
|
# Raised when the C-API returns error codes
|
2023-08-11 02:18:29 +01:00
|
|
|
class VMCAPIError < VMError
|
|
|
|
attr_reader :fn_name, :code
|
|
|
|
|
2023-08-29 11:21:05 +01:00
|
|
|
# create a new VMCAPIError with given C-API function name and error code
|
2023-08-11 02:18:29 +01:00
|
|
|
def initialize(fn_name, code)
|
|
|
|
@fn_name = fn_name
|
|
|
|
@code = code
|
2023-08-18 21:26:54 +01:00
|
|
|
super("#{fn_name} returned #{code}")
|
2023-08-11 02:18:29 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2023-07-07 02:38:13 +01:00
|
|
|
end
|