-
-
Save jcm93/98be5d2878d1e4a62c6b2dc9c14e0bcb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//: Playground - noun: a place where people can play | |
import CoreAudio | |
import Foundation | |
var addr = AudioObjectPropertyAddress(mSelector: kAudioHardwarePropertyTransportManagerList, mScope: kAudioObjectPropertyScopeWildcard, mElement: kAudioObjectPropertyElementWildcard) | |
var transportManagerListSize: UInt32 = 1234 | |
AudioObjectGetPropertyDataSize(AudioObjectID(kAudioObjectSystemObject), &addr, 0, nil, &transportManagerListSize) | |
transportManagerListSize | |
let transportManagerListCount = Int(transportManagerListSize / UInt32(MemoryLayout<UInt32>.size)) | |
var transportManagerList = [UInt32](repeating: 1234, count: transportManagerListCount) | |
AudioObjectGetPropertyData(AudioObjectID(kAudioObjectSystemObject), &addr, 0, nil, &transportManagerListSize, &transportManagerList) | |
transportManagerList |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment