class FMOD::Core::Driver
Identification information about a sound device.
Attributes
channels[R]
@return [Integer] the number of channels in the current speaker setup.
guid[R]
@return [Guid] the GUID that uniquely identifies the device.
id[R]
@return [Integer] the enumerated driver ID.
name[R]
@return [String] the name of the device encoded in a UTF-8 string.
rate[R]
@return [Integer] the sample rate this device operates at.
speaker_mode[R]
@return [Integer] the speaker setup this device is currently using. @see SpeakerMode
state[R]
@return [Integer] flags that provide additional information about the
driver.
Public Class Methods
new(args)
click to toggle source
@param args [Array] Array of binary data. @api private
# File lib/fmod/core/driver.rb, line 43 def initialize(args) @id = args.shift # noinspection RubyResolve @name = args.shift.delete("\0").force_encoding(Encoding::UTF_8) args.shift @guid = args.shift @rate, @speaker_mode, @channels, @state = args.join.unpack('l*') end
Public Instance Methods
record_driver?()
click to toggle source
@return [Boolean] true
if this a record driver, otherwise false
.
# File lib/fmod/core/driver.rb, line 54 def record_driver? !@state.nil? end