     /// - Returns: *(optional)* A `String` with the data source name.
     public func dataSourceName(dataSourceID: UInt32, direction: Direction) -> String? {
         var name: CFString = "" as CFString
-        var theDataSourceID = dataSourceID
-
-        var translation = AudioValueTranslation(
-            mInputData: &theDataSourceID,
-            mInputDataSize: UInt32(MemoryLayout<UInt32>.size),
-            mOutputData: &name,
-            mOutputDataSize: UInt32(MemoryLayout<CFString>.size)
-        )
-
-        let address = AudioObjectPropertyAddress(
-            mSelector: kAudioDevicePropertyDataSourceNameForIDCFString,
-            mScope: scope(direction: direction),
-            mElement: kAudioObjectPropertyElementMaster
-        )
-
-        let status = getPropertyData(address, andValue: &translation)
+        var mDataSourceID = dataSourceID
+
+        let status: OSStatus = withUnsafeMutablePointer(to: &mDataSourceID) { (mDataSourceIDPtr) in
+            withUnsafeMutablePointer(to: &name) { (namePtr) in
+                var translation = AudioValueTranslation(
+                    mInputData: mDataSourceIDPtr,
+                    mInputDataSize: UInt32(MemoryLayout<UInt32>.size),
+                    mOutputData: namePtr,
+                    mOutputDataSize: UInt32(MemoryLayout<CFString>.size)
+                )
+
+                let address = AudioObjectPropertyAddress(
+                    mSelector: kAudioDevicePropertyDataSourceNameForIDCFString,
+                    mScope: scope(direction: direction),
+                    mElement: kAudioObjectPropertyElementMaster
+                )
+                
+                return getPropertyData(address, andValue: &translation)
+            }
+        }
 
         return noErr == status ? (name as String) : nil
     }


        var deviceID = kAudioObjectUnknown
        var cfUID = (uid as CFString)

        var translation = AudioValueTranslation(
            mInputData: &cfUID,
            mInputDataSize: UInt32(MemoryLayout<CFString>.size),
            mOutputData: &deviceID,
            mOutputDataSize: UInt32(MemoryLayout<AudioObjectID>.size)
        )

        let status = getPropertyData(AudioObjectID(kAudioObjectSystemObject),
                                     address: address,
                                     andValue: &translation)

        if noErr != status || deviceID == kAudioObjectUnknown {
            return nil

    /// - Returns: *(optional)* A `String` with the source clock name.
    public func clockSourceName(clockSourceID: UInt32) -> String? {
        var name: CFString = "" as CFString
        var mClockSourceID = clockSourceID

        let status: OSStatus = withUnsafeMutablePointer(to: &mClockSourceID) { (mClockSourceIDPtr) in
            withUnsafeMutablePointer(to: &name) { (namePtr) in
                var translation = AudioValueTranslation(
                    mInputData: mClockSourceIDPtr,
                    mInputDataSize: UInt32(MemoryLayout<UInt32>.size),
                    mOutputData: namePtr,
                    mOutputDataSize: UInt32(MemoryLayout<CFString>.size)
                )

                let address = AudioObjectPropertyAddress(
                    mSelector: kAudioDevicePropertyClockSourceNameForIDCFString,
                    mScope: kAudioObjectPropertyScopeGlobal,
                    mElement: kAudioObjectPropertyElementMaster
                )

                return getPropertyData(address, andValue: &translation)
            }
        }

        return noErr == status ? (name as String) : nil
    }
