                                         &encoderSpecSize,
                                         &encoderDescriptions)
         
-        print("getProperty", encoderSpecifier, encoderSpecSize, encoderDescriptions)
-        
         if status != noErr {
             print("Error getting available encoder descriptions:", status)
             return nil
         }
         
         print(encoderDescriptions)
-        for description in encoderDescriptions {
-            guard let description = description else { continue }
-            if description.mSubType == kAudioFormatMPEG4AAC {
-                if description.mManufacturer == kAppleSoftwareAudioCodecManufacturer {
-                    return description
-                }
-            }
-        }
-        
-        return nil
+        let filtered = encoderDescriptions.flatMap { $0 }
+        return filtered.first
+        
+//        for description in encoderDescriptions {
+//            guard let description = description else { continue }
+//            if description.mSubType == kAudioFormatMPEG4AAC {
+//                if description.mManufacturer == kAppleSoftwareAudioCodecManufacturer {
+//                    return description
+//                }
+//            }
+//        }
+//        return nil
     }
     #endif
 }

    
    #if os(iOS)
    private func getAudioClassDescription() -> AudioClassDescription? {
        
        var encoderSpecifier        = kAudioFormatMPEG4AAC
        var encoderSpecSize: UInt32 = 0
        

            print("Error getting available encoders:", status)
            return nil
        }
        
        let numEncoders = Int(encoderSpecSize) / MemoryLayout<AudioClassDescription>.size
        var encoderDescriptions = [AudioClassDescription?](repeating: nil, count: numEncoders)
