Class: CoreAudio::AudioStream
- Inherits:
-
AudioObject
- Object
- AudioObject
- CoreAudio::AudioStream
- Defined in:
- lib/macos/core_audio/audio_stream.rb
Constant Summary collapse
- PropertyIsActive =
'sact', PropertyDirection = 'sdir', PropertyTerminalType = 'term', PropertyStartingChannel = 'schn', PropertyLatency = CoreAudio::AudioDevice::PropertyLatency, PropertyVirtualFormat = 'sfmt', PropertyAvailableVirtualFormats = 'sfma', PropertyPhysicalFormat = 'pft ', PropertyAvailablePhysicalFormats = 'pfta'
Constants inherited from AudioObject
CoreAudio::AudioObject::ObjectID, CoreAudio::AudioObject::PropertyBaseClass, CoreAudio::AudioObject::PropertyClass, CoreAudio::AudioObject::PropertyElement, CoreAudio::AudioObject::PropertyElementCategoryName, CoreAudio::AudioObject::PropertyElementMaster, CoreAudio::AudioObject::PropertyElementName, CoreAudio::AudioObject::PropertyElementNumberName, CoreAudio::AudioObject::PropertyFirmwareVersion, CoreAudio::AudioObject::PropertyIdentify, CoreAudio::AudioObject::PropertyManufacturer, CoreAudio::AudioObject::PropertyModelName, CoreAudio::AudioObject::PropertyName, CoreAudio::AudioObject::PropertyOwnedObjects, CoreAudio::AudioObject::PropertyOwner, CoreAudio::AudioObject::PropertyScope, CoreAudio::AudioObject::PropertyScopeGlobal, CoreAudio::AudioObject::PropertyScopeInput, CoreAudio::AudioObject::PropertyScopeOutput, CoreAudio::AudioObject::PropertyScopePlayThrough, CoreAudio::AudioObject::PropertySelector, CoreAudio::AudioObject::PropertySerialNumber, CoreAudio::AudioObject::SystemObject
Instance Attribute Summary
Attributes inherited from AudioObject
Instance Method Summary collapse
Methods inherited from AudioObject
#device_name, #device_uid, #external?, #get_property, #initialize, #internal?, #model_uid, #set_property, system, #transport_type
Constructor Details
This class inherits a constructor from CoreAudio::AudioObject
Instance Method Details
#virtual_format ⇒ Object
77 78 79 80 81 |
# File 'lib/macos/core_audio/audio_stream.rb', line 77 def virtual_format address = PropertyAddress.global_master(PropertyVirtualFormat) buffer = get_property(address) AudioStreamBasicDescription.new(buffer) end |
#virtual_formats ⇒ Object
83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/macos/core_audio/audio_stream.rb', line 83 def virtual_formats address = PropertyAddress.global_master(PropertyAvailableVirtualFormats) buffer = get_property(address) count = buffer.size/AudioStreamRangedDescription.size output = [] count.times do |i| output << AudioStreamRangedDescription.new(buffer) buffer += AudioStreamRangedDescription.size end output end |