AudioToolbox

RSS for tag

Record or play audio convert formats parse audio streams and configure your audio session using AudioToolbox.

Posts under AudioToolbox tag

135 Posts

Post

Replies

Boosts

Views

Activity

How to start audio recording when app running on background?
I am working on audio recording. when application running on foreground i have to start audio recording and going to background at that time audio recording working fine. But my question is that how to start audio recording when i am already in background, My audio recording function fired like this: I have a Bluetooth LE device with buttons and an iOS app. Those two are paired (Bluetooth LE device and the iPhone which runs the iOS app) and the iOS app is listening for events on the Bluetooth LE device, events like a hit of a button. Now, when the user hits a button on the Bluetooth LE device, the iOS app captures the event and I am able to run code even if the app is in background, but I am not able to start a voice recording. I have already enable Background Modes: Here is my Code for Audio Recording: func startRecording() { DispatchQueue.global(qos: .background).asyncAfter(deadline: DispatchTime.now(), qos: .background) { let audioFilename = self.getDocumentsDirectory().appendingPathComponent("recording.m4a") print("record Audio \(audioFilename)") let settings = [ AVFormatIDKey: Int(kAudioFormatMPEG4AAC), AVSampleRateKey: 12000, AVNumberOfChannelsKey: 1, AVEncoderAudioQualityKey: AVAudioQuality.high.rawValue ] do { self.audioRecorder = try AVAudioRecorder(url: audioFilename, settings: settings) self.audioRecorder.delegate = self self.audioRecorder.record() } catch { self.finishRecording(success: false) } } } func getDocumentsDirectory() -> URL {     let paths = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)     return paths[0]   } I can't find proper solution to do that thing, Please suggest me proper way to do that, Thanks in Advance.
2
0
1.8k
Jan ’22
AU host crashes in IOThread in macOS 11 and later
Hi, I've problem with an AU host (based on Audio Toolbox/Core Audio, not AVFoundation) when running on macOS 11 or later and Apple Silicon – it crashes after some operations in GUI. The weird is, it crashes in IOThread. Could this be caused by some inappropriate operation in GUI (eg. outside the main thread) that effects the IOThread? Sounds quite improbable to me. And I did not find anything suspicious in the code. There are two logs in the debugger: [AUHostingService Client] connection interrupted. rt_sender::signal_wait failed: 89 ... And here is the crash log: Crash log: ... Thanks, Tomas
0
0
1.2k
Jan ’22
AVAudioEngine - output format has 0 channels after changing device of auAudioUnit of the inputNode
I'm trying to change device of the inputNode of AVAudioEngine. To do so, I'm calling setDeviceID on its auAudioUnit. Although this call doesn't fail, something wrong happens to the output busses. When I ask for its format, it shows a 0Hz and 0 channels format. It makes the app crash when I try to connect the node to the mainMixerNode. Can anyone explain what's wrong with this code? avEngine = AVAudioEngine() print(avEngine.inputNode.auAudioUnit.inputBusses[0].format) // <AVAudioFormat 0x1404b06e0: 2 ch, 44100 Hz, Float32, non-inter> print(avEngine.inputNode.auAudioUnit.outputBusses[0].format) // <AVAudioFormat 0x1404b0a60: 2 ch, 44100 Hz, Float32, inter> // Now, let's change a device from headphone's mic to built-in mic. try! avEngine.inputNode.auAudioUnit.setDeviceID(inputDevice.deviceID) print(avEngine.inputNode.auAudioUnit.inputBusses[0].format) // <AVAudioFormat 0x1404add50: 2 ch, 44100 Hz, Float32, non-inter> print(avEngine.inputNode.auAudioUnit.outputBusses[0].format) // <AVAudioFormat 0x1404adff0: 0 ch, 0 Hz, 'lpcm' (0x00000029) 32-bit little-endian float, deinterleaved> // !!! // Interestingly, 'inputNode' shows a different format than `auAudioUnit` print(avEngine.inputNode.inputFormat(forBus: 0)) // <AVAudioFormat 0x1404af480: 1 ch, 44100 Hz, Float32> print(avEngine.inputNode.outputFormat(forBus: 0)) // <AVAudioFormat 0x1404ade30: 1 ch, 44100 Hz, Float32> Edit: Further debugging revels another puzzling thing. avEngine.inputNode.auAudioUnit == avEngine.outputNode.auAudioUnit // this is true ?! inputNode and outputNode share the same AUAudioUnit. And its deviceID is by default set to the speakers. It's so confusing to me...why would inpudeNode's device be a speaker?
1
0
2.0k
Dec ’21
The output volume is abnormal when VPIO is switched to RemoteIO
The voice call in our game has such a usage scenario: when the player does not wear the headset or Bluetooth, we use the VPIO mode to turn on the microphone. On the contrary, the player wears the headset or Bluetooth, and the remoteIO mode is used to turn on the microphone. So we have a switch between VPIO and RemoteIO。When we only use RemoteIO (the player has been wearing headphones or Bluetooth since the game), the output volume does not change before and after the microphone is switched on. When we only use the VPIO mode (the player has not been wearing headphones or Bluetooth since the game), before and after turning on the microphone, the output volume will reduce a little (because turning on the microphone will cause the phone to enter the VPIO and the echo cancellation will be turned on), the performance of the output volume in the above two scenarios is normal。However, when we switched between VPIO and RemotoIO (the player didn’t wear headphones or Bluetooth at the beginning, and brought headphones or Bluetooth in the middle of the game), we encountered some problems: As long as I have used VPIO mode before RemotoIO mode, the output volume in RemoteIO mode after turning on the microphone will be the same as in VPIO mode (normally the output volume in RemoteIO should be greater than in VPIO mode), turn off the microphone ,The output volume will become normal.What confuses me is: My understanding is that when we use RemoteIO, the mobile phone should not do some suppression-like speech algorithms, so when we only use RemoteIO, the output volume of the mobile phone does not change. When we use VPIO, the mobile phone will use echo Algorithms, and perhaps dynamic compression and some gain algorithm processing. At this time, the output volume will be reduced to better handle the echo. This behavior is normal. However, when I switch between VPIO and RemotIO, I feel that when I use RemoteIO (VPIO resources are released), some of the previous VPIO algorithm processing is still reserved (may be dynamic compression or gain algorithm), which finally leads to the output volume under RemoteIO is the same as that under VPIO, and this only happens on all of IOS14, the previous version is normal (anytime you enter the remoteIO mode, the volume does not change). I want to know, For IOS14 this behavior (VPIO and RemoteIO switching causes the volume of RemoteIO to decrease) is normal? If it is not normal, how can we solve it?
1
0
1.3k
Nov ’21
AudioToolBox crash report only in iOS 12.3 above OS apple devices
From iOS 12.3 and above iOS versions we are getting AudioToolBox crashes, we do not know why these crashes are happening. We have Crashlytics Crash report but we are not able to debug the issue with the help of Crashlytics crash report.I have attached the Crashlytics crash report.Background of our application :Our application streams the video using RTSP url and VLC mobile kit. even when the application is sent to the background the streaming continues and the stream will try to reconnect when the stream disconnects due to some error.While streaming the video in the background we show the user a red bar on the user iPhone.We tried different scenarios to reproduce the issue some of them are1) we checked if it is happening when we receive a mobile call when the user is streaming2) We checked if interruptions from other streaming applications are causing the issue3) We checked if Siri or getting a face time call is creating the crashWe tried all the above mentioned in debugging, as well as release, buildsfind the crash report details belowJul 2019 11:18:45 GMT # Date: 2019-07-04T10:59:00Z # OS Version: 12.3.1 (16F203) # Device: iPhone 8 # RAM Free: 9.6% # Disk Free: 53.9% #22. Crashed: com.apple.coreaudio.auremoteio 0 AudioToolbox 0x18c489058 SampleRateConverter::SetProperty(unsigned int, unsigned int, void const*) + 192 1 AudioToolbox 0x18c669580 AudioConverterSetProperty + 96 2 AudioToolbox 0x18c51c638 AUConverterBase::SetupConverter(unsigned int, bool) + 1340 3 AudioToolbox 0x18c3fe948 AURemoteIO::SetupConverter(unsigned int, bool) + 224 4 AudioToolbox 0x18c51aed8 AUConverterBase::SetupAllConverters(bool, unsigned int) + 104 5 AudioToolbox 0x18c400a0c AURemoteIO::IOFormatsChanged(int) + 1420 6 AudioToolbox 0x18c402afc __AURIOCallbackReceiver_IOFormatsChanged_block_invoke + 96 7 libdispatch.dylib 0x187f80a38 _dispatch_call_block_and_release + 24 8 libdispatch.dylib 0x187f817d4 _dispatch_client_callout + 16 9 libdispatch.dylib 0x187f5cdec _dispatch_lane_serial_drain$VARIANT$armv81 + 548 10 libdispatch.dylib 0x187f5d92c _dispatch_lane_invoke$VARIANT$armv81 + 408 11 libdispatch.dylib 0x187f65e08 _dispatch_workloop_worker_thread + 584 12 libsystem_pthread.dylib 0x188161114 _pthread_wqthread + 304 13 libsystem_pthread.dylib 0x188163cd4 start_wqthread + 4 -- #0. com.apple.main-thread 0 AppName 0x101169978 _gnutls_ext_deinit + 417 (extensions.c:417) 1 AppName 0x10116f750 _gnutls_global_deinit + 416 (global.c:416) 2 (Missing) 0x1032313c0 (Missing) 3 (Missing) 0x10321a7b8 (Missing) 4 libsystem_c.dylib 0x188038bb4 __cxa_finalize_ranges + 384 5 libsystem_c.dylib 0x188038ec4 exit + 24 6 UIKitCore 0x1b4e4ed2c -[UIApplication terminateWithSuccess] + 466 7 UIKitCore 0x1b470adb4 __98-[__UICanvasLifecycleMonitor_Compatability deactivateEventsOnly:withContext:forceExit:completion:]_block_invoke.261 + 344 8 UIKitCore 0x1b4e52dec _runAfterCACommitDeferredBlocks + 296 9 UIKitCore 0x1b4e4193c _cleanUpAfterCAFlushAndRunDeferredBlocks + 352 10 UIKitCore 0x1b4e6e7ac _afterCACommitHandler + 116 11 CoreFoundation 0x1884d25f8 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32 12 CoreFoundation 0x1884cd320 __CFRunLoopDoObservers + 412 13 CoreFoundation 0x1884cd89c __CFRunLoopRun + 1228 14 CoreFoundation 0x1884cd0b0 CFRunLoopRunSpecific + 436 15 GraphicsServices 0x18a6cd79c GSEventRunModal + 104 16 UIKitCore 0x1b4e47978 UIApplicationMain + 212 17 AppName 0x1007fd1f4 main + 24 (AppDelegate.swift:24) 18 libdyld.dylib 0x187f928e0 start + 4 #1. com.apple.uikit.eventfetch-thread 0 libsystem_kernel.dylib 0x1880d30f4 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x1880d25a0 mach_msg + 72 2 CoreFoundation 0x1884d2a10 __CFRunLoopServiceMachPort + 236 3 CoreFoundation 0x1884cd920 __CFRunLoopRun + 1360 4 CoreFoundation 0x1884cd0b0 CFRunLoopRunSpecific + 436 5 Foundation 0x188e9afac -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 300 6 Foundation 0x188e9ae3c -[NSRunLoop(NSRunLoop) runUntilDate:] + 96 7 UIKitCore 0x1b4f2d494 -[UIEventFetcher threadMain] + 136 8 Foundation 0x188fc76a4 __NSThread__start__ + 984 9 libsystem_pthread.dylib 0x1881602c0 _pthread_body + 128 10 libsystem_pthread.dylib 0x188160220 _pthread_start + 44 11 libsystem_pthread.dylib 0x188163cdc thread_start + 4 #2. GAIThread 0 libsystem_kernel.dylib 0x1880d30f4 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x1880d25a0 mach_msg + 72 2 CoreFoundation 0x1884d2a10 __CFRunLoopServiceMachPort + 236 3 CoreFoundation 0x1884cd920 __CFRunLoopRun + 1360 4 CoreFoundation 0x1884cd0b0 CFRunLoopRunSpecific + 436 5 Foundation 0x188e9afac -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 300 6 Foundation 0x188ed646c -[NSRunLoop(NSRunLoop) run] + 88 7 AppName 0x100bc9d14 +[GAI threadMain:] + 4345896212 8 Foundation 0x188fc76a4 __NSThread__start__ + 984 9 libsystem_pthread.dylib 0x1881602c0 _pthread_body + 128 10 libsystem_pthread.dylib 0x188160220 _pthread_start + 44 11 libsystem_pthread.dylib 0x188163cdc thread_start + 4 #3. com.apple.CFSocket.private 0 libsystem_kernel.dylib 0x1880de328 __select + 8 1 CoreFoundation 0x1884db6f4 __CFSocketManager + 620 2 libsystem_pthread.dylib 0x1881602c0 _pthread_body + 128 3 libsystem_pthread.dylib 0x188160220 _pthread_start + 44 4 libsystem_pthread.dylib 0x188163cdc thread_start + 4 #4. com.twitter.crashlytics.ios.MachExceptionServer 0 AppName 0x100aded58 CLSProcessRecordAllThreads + 4344933720 1 AppName 0x100adf140 CLSProcessRecordAllThreads + 4344934720 2 AppName 0x100ace9bc CLSHandler + 4344867260 3 AppName 0x100ac9d9c CLSMachExceptionServer + 4344847772 4 libsystem_pthread.dylib 0x1881602c0 _pthread_body + 128 5 libsystem_pthread.dylib 0x188160220 _pthread_start + 44 6 libsystem_pthread.dylib 0x188163cdc thread_start + 4 #5. AVAudioSession Notify Thread 0 libsystem_kernel.dylib 0x1880d30f4 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x1880d25a0 mach_msg + 72 2 CoreFoundation 0x1884d2a10 __CFRunLoopServiceMachPort + 236 3 CoreFoundation 0x1884cd920 __CFRunLoopRun + 1360 4 CoreFoundation 0x1884cd0b0 CFRunLoopRunSpecific + 436 5 AVFAudio 0x18e3b5334 GenericRunLoopThread::Entry(void*) + 156 6 AVFAudio 0x18e3dfc60 CAPThread::Entry(CAPThread*) + 88 7 libsystem_pthread.dylib 0x1881602c0 _pthread_body + 128 8 libsystem_pthread.dylib 0x188160220 _pthread_start + 44 9 libsystem_pthread.dylib 0x188163cdc thread_start + 4 #6. com.apple.NSURLConnectionLoader 0 libsystem_kernel.dylib 0x1880d30f4 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x1880d25a0 mach_msg + 72 2 CoreFoundation 0x1884d2a10 __CFRunLoopServiceMachPort + 236 3 CoreFoundation 0x1884cd920 __CFRunLoopRun + 1360 4 CoreFoundation 0x1884cd0b0 CFRunLoopRunSpecific + 436 5 CFNetwork 0x188ae674c -[__CoreSchedulingSetRunnable runForever] + 216 6 Foundation 0x188fc76a4 __NSThread__start__ + 984 7 libsystem_pthread.dylib 0x1881602c0 _pthread_body + 128 8 libsystem_pthread.dylib 0x188160220 _pthread_start + 44 9 libsystem_pthread.dylib 0x188163cdc thread_start + 4 #7. Thread 0 libsystem_kernel.dylib 0x1880dffd8 poll + 8 1 CustomSDK 0x103661de8 _lws_plat_service_tsi + 236 2 CustomSDK 0x1036a3554 websocket_worker + 60 3 libsystem_pthread.dylib 0x1881602c0 _pthread_body + 128 4 libsystem_pthread.dylib 0x188160220 _pthread_start + 44 5 libsystem_pthread.dylib 0x188163cdc thread_start + 4 #8. Thread 0 libsystem_kernel.dylib 0x1880de9d4 __ulock_wait + 8 1 libdispatch.dylib 0x187f50c20 _dispatch_ulock_wait + 56 2 libdispatch.dylib 0x187f50d58 _dispatch_thread_event_wait_slow$VARIANT$armv81 + 48 3 libdispatch.dylib 0x187f628a8 __DISPATCH_WAIT_FOR_QUEUE__ + 336 4 libdispatch.dylib 0x187f624a8 _dispatch_sync_f_slow + 140 5 AppName 0x100c397e0 -[VLCEventManager startEventLoop] + 220 (VLCEventManager.m:220) 6 AppName 0x100c3916c EventDispatcherMainLoop + 97 (VLCEventManager.m:97) 7 libsystem_pthread.dylib 0x1881602c0 _pthread_body + 128 8 libsystem_pthread.dylib 0x188160220 _pthread_start + 44 9 libsystem_pthread.dylib 0x188163cdc thread_start + 4 #9. Thread 0 libsystem_kernel.dylib 0x1880d30f4 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x1880d25a0 mach_msg + 72 2 CoreFoundation 0x1884d2a10 __CFRunLoopServiceMachPort + 236 3 CoreFoundation 0x1884cd920 __CFRunLoopRun + 1360 4 CoreFoundation 0x1884cd0b0 CFRunLoopRunSpecific + 436 5 CustomSDK 0x103634e60 -[P2PCamera worker] + 88 6 Foundation 0x188fc76a4 __NSThread__start__ + 984 7 libsystem_pthread.dylib 0x1881602c0 _pthread_body + 128 8 libsystem_pthread.dylib 0x188160220 _pthread_start + 44 9 libsystem_pthread.dylib 0x188163cdc thread_start + 4 #10. Thread 0 libsystem_kernel.dylib 0x1880de328 __select + 8 1 CustomSDK 0x103776534 pj_sock_select + 84 2 CustomSDK 0x103772340 pj_ioqueue_poll + 196 3 CustomSDK 0x103699bc4 _pjice_worker_thread + 172 4 CustomSDK 0x10377329c thread_main + 84 5 libsystem_pthread.dylib 0x1881602c0 _pthread_body + 128 6 libsystem_pthread.dylib 0x188160220 _pthread_start + 44 7 libsystem_pthread.dylib 0x188163cdc thread_start + 4 #11. Thread 0 libsystem_kernel.dylib 0x1880de328 __select + 8 1 CustomSDK 0x103776534 pj_sock_select + 84 2 CustomSDK 0x103772340 pj_ioqueue_poll + 196 3 CustomSDK 0x103699bc4 _pjice_worker_thread + 172 4 CustomSDK 0x10377329c thread_main + 84 5 libsystem_pthread.dylib 0x1881602c0 _pthread_body + 128 6 libsystem_pthread.dylib 0x188160220 _pthread_start + 44 7 libsystem_pthread.dylib 0x188163cdc thread_start + 4 #12. Thread 0 libsystem_kernel.dylib 0x1880de328 __select + 8 1 CustomSDK 0x103776534 pj_sock_select + 84 2 CustomSDK 0x103772340 pj_ioqueue_poll + 196 3 CustomSDK 0x103699bc4 _pjice_worker_thread + 172 4 CustomSDK 0x10377329c thread_main + 84 5 libsystem_pthread.dylib 0x1881602c0 _pthread_body + 128 6 libsystem_pthread.dylib 0x188160220 _pthread_start + 44 7 libsystem_pthread.dylib 0x188163cdc thread_start + 4 #13. Thread 0 libsystem_kernel.dylib 0x1880de400 __semwait_signal + 8 1 libsystem_c.dylib 0x18805556c nanosleep + 212 2 libsystem_c.dylib 0x18805536c sleep + 44 3 CustomSDK 0x103697a08 _port_forward_conn_thread + 132 4 libsystem_pthread.dylib 0x1881602c0 _pthread_body + 128 5 libsystem_pthread.dylib 0x188160220 _pthread_start + 44 6 libsystem_pthread.dylib 0x188163cdc thread_start + 4 #14. Thread 0 libsystem_kernel.dylib 0x1880de328 __select + 8 1 CustomSDK 0x103697e88 _port_forward_io_thread + 740 2 libsystem_pthread.dylib 0x1881602c0 _pthread_body + 128 3 libsystem_pthread.dylib 0x188160220 _pthread_start + 44 4 libsystem_pthread.dylib 0x188163cdc thread_start + 4 #15. Thread 0 libsystem_kernel.dylib 0x1880de328 __select + 8 1 AppName 0x101be7740 BasicTaskScheduler::SingleStep(unsigned int) + 91 (BasicTaskScheduler.cpp:91) 2 AppName 0x101be70d0 BasicTaskScheduler0::doEventLoop(char volatile*) + 79 (BasicTaskScheduler0.cpp:79) 3 AppName 0x101d6086c Demux(demux_t*) + 1420 (live555.cpp:1420) 4 libsystem_pthread.dylib 0x188160220 _pthread_start + 44 5 libsystem_pthread.dylib 0x188163cdc thread_start + 4 #16. Thread 0 libsystem_kernel.dylib 0x1880ddee4 __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x18815d4d8 _pthread_cond_wait$VARIANT$armv81 + 680 2 AppName 0x100cc08a8 vlc_cond_timedwait + 263 (thread.c:263) 3 AppName 0x100cbff40 vlc_timer_thread + 85 (timer.c:85) 4 libsystem_pthread.dylib 0x1881602c0 _pthread_body + 128 5 libsystem_pthread.dylib 0x188160220 _pthread_start + 44 6 libsystem_pthread.dylib 0x188163cdc thread_start + 4 #17. Thread 0 libsystem_kernel.dylib 0x1880d3130 semaphore_wait_trap + 8 1 AppName 0x100c93ad4 aout_DecPlay + 212 (dec.c:212) 2 libsystem_pthread.dylib 0x188160220 _pthread_start + 44 3 libsystem_pthread.dylib 0x188163cdc thread_start + 4 #18. Thread 0 libsystem_kernel.dylib 0x1880ddee4 __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x18815d4a4 _pthread_cond_wait$VARIANT$armv81 + 628 2 AppName 0x100c78220 DecoderThread + 1596 (decoder.c:1596) 3 libsystem_pthread.dylib 0x188160220 _pthread_start + 44 4 libsystem_pthread.dylib 0x188163cdc thread_start + 4 #19. AURemoteIO::IOThread 0 libsystem_kernel.dylib 0x1880d30f4 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x1880d25a0 mach_msg + 72 2 AudioToolbox 0x18c401890 AURemoteIO::IOThread::Run() + 256 3 AudioToolbox 0x18c406800 AURemoteIO::IOThread::Entry(void*) + 76 4 AudioToolbox 0x18c7d94f8 CAPThread::Entry(CAPThread*) + 88 5 libsystem_pthread.dylib 0x1881602c0 _pthread_body + 128 6 libsystem_pthread.dylib 0x188160220 _pthread_start + 44 7 libsystem_pthread.dylib 0x188163cdc thread_start + 4 #20. Thread 0 libsystem_kernel.dylib 0x1880deb74 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x1881611f8 _pthread_wqthread + 532 2 libsystem_pthread.dylib 0x188163cd4 start_wqthread + 4 #21. Thread 0 libsystem_kernel.dylib 0x1880deb74 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x188161138 _pthread_wqthread + 340 2 libsystem_pthread.dylib 0x188163cd4 start_wqthread + 4 #22. Crashed: com.apple.coreaudio.auremoteio 0 AudioToolbox 0x18c489058 SampleRateConverter::SetProperty(unsigned int, unsigned int, void const*) + 192 1 AudioToolbox 0x18c669580 AudioConverterSetProperty + 96 2 AudioToolbox 0x18c51c638 AUConverterBase::SetupConverter(unsigned int, bool) + 1340 3 AudioToolbox 0x18c3fe948 AURemoteIO::SetupConverter(unsigned int, bool) + 224 4 AudioToolbox 0x18c51aed8 AUConverterBase::SetupAllConverters(bool, unsigned int) + 104 5 AudioToolbox 0x18c400a0c AURemoteIO::IOFormatsChanged(int) + 1420 6 AudioToolbox 0x18c402afc __AURIOCallbackReceiver_IOFormatsChanged_block_invoke + 96 7 libdispatch.dylib 0x187f80a38 _dispatch_call_block_and_release + 24 8 libdispatch.dylib 0x187f817d4 _dispatch_client_callout + 16 9 libdispatch.dylib 0x187f5cdec _dispatch_lane_serial_drain$VARIANT$armv81 + 548 10 libdispatch.dylib 0x187f5d92c _dispatch_lane_invoke$VARIANT$armv81 + 408 11 libdispatch.dylib 0x187f65e08 _dispatch_workloop_worker_thread + 584 12 libsystem_pthread.dylib 0x188161114 _pthread_wqthread + 304 13 libsystem_pthread.dylib 0x188163cd4 start_wqthread + 4 #23. Thread 0 libsystem_kernel.dylib 0x1880deb74 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x188161138 _pthread_wqthread + 340 2 libsystem_pthread.dylib 0x188163cd4 start_wqthread + 4 #24. Thread 0 libsystem_kernel.dylib 0x1880deb74 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x1881611f8 _pthread_wqthread + 532 2 libsystem_pthread.dylib 0x188163cd4 start_wqthread + 4 #25. Thread 0 libsystem_kernel.dylib 0x1880deb74 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x1881611f8 _pthread_wqthread + 532 2 libsystem_pthread.dylib 0x188163cd4 start_wqthread + 4 #26. AURemoteIO::IOThread 0 libsystem_kernel.dylib 0x1880d30f4 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x1880d25a0 mach_msg + 72 2 AudioToolbox 0x18c401890 AURemoteIO::IOThread::Run() + 256 3 AudioToolbox 0x18c406800 AURemoteIO::IOThread::Entry(void*) + 76 4 AudioToolbox 0x18c7d94f8 CAPThread::Entry(CAPThread*) + 88 5 libsystem_pthread.dylib 0x1881602c0 _pthread_body + 128 6 libsystem_pthread.dylib 0x188160220 _pthread_start + 44 7 libsystem_pthread.dylib 0x188163cdc thread_start + 4
13
0
6.8k
Nov ’21
How to process the audio bufferList with AVAudioEngine?
I have an AVMutableAudioMix and use MTAudioProcessingTap to process the audio data.But After I pass the buffer to AVAudioEngine and to render it with renderOffline,the audio has no any effects...How can I do it? Any idea? Here is the code for MTAudioProcessingTapProcessCallback var callback = MTAudioProcessingTapCallbacks(version: kMTAudioProcessingTapCallbacksVersion_0, clientInfo:UnsafeMutableRawPointer(Unmanaged.passUnretained(self.engine).toOpaque()), init: tapInit, finalize: tapFinalize, prepare: tapPrepare, unprepare: tapUnprepare) { tap, numberFrames, flags, bufferListInOut, numberFramesOut, flagsOut in                       guard MTAudioProcessingTapGetSourceAudio(tap, numberFrames, bufferListInOut, flagsOut, nil, numberFramesOut) == noErr else {         preconditionFailure()       }       let storage = MTAudioProcessingTapGetStorage(tap)       let engine = Unmanaged<Engine>.fromOpaque(storage).takeUnretainedValue()       // render the audio with effect       engine.render(bufferPtr: bufferListInOut,numberOfFrames: numberFrames)     } And here is the Engine code class Engine {   let engine = AVAudioEngine()       let player = AVAudioPlayerNode()   let pitchEffect = AVAudioUnitTimePitch()   let reverbEffect = AVAudioUnitReverb()   let rateEffect = AVAudioUnitVarispeed()   let volumeEffect = AVAudioUnitEQ()   let format = AVAudioFormat(commonFormat: .pcmFormatFloat32, sampleRate: 44100, channels: 2, interleaved: false)!   init() {     engine.attach(player)     engine.attach(pitchEffect)     engine.attach(reverbEffect)     engine.attach(rateEffect)     engine.attach(volumeEffect)           engine.connect(player, to: pitchEffect, format: format)     engine.connect(pitchEffect, to: reverbEffect, format: format)     engine.connect(reverbEffect, to: rateEffect, format: format)     engine.connect(rateEffect, to: volumeEffect, format: format)     engine.connect(volumeEffect, to: engine.mainMixerNode, format: format)           try! engine.enableManualRenderingMode(.offline, format: format, maximumFrameCount: 4096)           reverbEffect.loadFactoryPreset(AVAudioUnitReverbPreset.largeRoom2)     reverbEffect.wetDryMix = 100     pitchEffect.pitch = 2100           try! engine.start()     player.play()   }       func render(bufferPtr:UnsafeMutablePointer<AudioBufferList>,numberOfFrames:CMItemCount) {     let buffer = AVAudioPCMBuffer(pcmFormat: format, frameCapacity: 4096)!     buffer.frameLength = AVAudioFrameCount(numberOfFrames)     buffer.mutableAudioBufferList.pointee = bufferPtr.pointee     self.player.scheduleBuffer(buffer) {       try! self.engine.renderOffline(AVAudioFrameCount(numberOfFrames), to: buffer)     }   } }
0
0
1.6k
Nov ’21
How to pass custom object in MTAudioProcessingTapCallbacks?
I wrote the code below to pass my custom object Engine in MTAudioProcessingTapCallbacks Here is code: func getTap() -> MTAudioProcessingTap? {     var tap: Unmanaged<MTAudioProcessingTap>?           func onInit(tap:MTAudioProcessingTap,clientInfo:UnsafeMutableRawPointer?,tagStroageOut:UnsafeMutablePointer<UnsafeMutableRawPointer?>) {               let engine = Engine()       tagStroageOut.pointee = Unmanaged<Engine>.passUnretained(engine).toOpaque()     }                 var callback = MTAudioProcessingTapCallbacks(version: kMTAudioProcessingTapCallbacksVersion_0, clientInfo:nil, init: onInit, finalize: nil, prepare: nil, unprepare: nil) { tap, numberFrames, flags, bufferListInOut, numberFramesOut, flagsOut in               guard MTAudioProcessingTapGetSourceAudio(tap, numberFrames, bufferListInOut, flagsOut, nil, numberFramesOut) == noErr else {         preconditionFailure()       }               let storage = MTAudioProcessingTapGetStorage(tap)       let engine = Unmanaged<Engine>.fromOpaque(storage).takeUnretainedValue()               // This line crashed :       // ClientProcessingTapManager (14): EXC_BAD_ACCESS (code=1, address=0x544453e46ea0)       engine.dealWith(bufferPtr: bufferListInOut)     }     guard MTAudioProcessingTapCreate(kCFAllocatorDefault, &callback, kMTAudioProcessingTapCreationFlag_PostEffects, &tap) == noErr else{       fatalError()     }     return tap?.takeRetainedValue()   } } How can I do it?
1
0
1.4k
Nov ’21
How to play audio from NSData in a library in Objective C
I'm trying to play an audio content built from NSData inside a library (.a). It works properly when my code is inside an app. But it is not working when in a library, I get no error and no sound playing. NSError * errorAudio = nil; NSError * errorFile; // Clear all cache NSArray* tmpDirectory = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:NSTemporaryDirectory() error:NULL]; for (NSString *file in tmpDirectory) {     [[NSFileManager defaultManager] removeItemAtPath:[NSString stringWithFormat:@"%@%@", NSTemporaryDirectory(), file] error:NULL]; } // Set temporary directory and temporary file NSURL * tmpDirURL = [NSURL fileURLWithPath:NSTemporaryDirectory() isDirectory:YES]; NSURL * soundFileURL = [[tmpDirURL URLByAppendingPathComponent:@"temp"] URLByAppendingPathExtension:@"wav"]; [[NSFileManager defaultManager] createDirectoryAtURL:tmpDirURL withIntermediateDirectories:NO attributes:nil error:&amp;errorFile]; // Write NSData to temporary file NSString *path= [soundFileURL path]; [audioToPlay writeToFile:path options:NSDataWritingAtomic error:&amp;errorFile]; if (errorFile) {     // Error while writing NSData } else {     // Init audio player     self.audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:soundFileURL error:&amp;errorAudio];     if (errorAudio) {         // Audio player could not be initialized     } else {         // Audio player was initialized correctly         [audioPlayer prepareToPlay];         [audioPlayer stop];         [audioPlayer setCurrentTime:0];         [audioPlayer play];     } } I don't check errorFile intros piece of code, but when debugging I can see that value is nil. My header file #import &lt;AudioToolbox/AudioToolbox.h&gt; #import &lt;AVFoundation/AVFoundation.h&gt; @property(nonatomic, strong) AVAudioPlayer * audioPlayer; My m file #import &lt;AudioToolbox/AudioToolbox.h&gt; #import &lt;AVFoundation/AVFoundation.h&gt; @synthesize audioPlayer; I've been checking for dozens of posts but cannot find any solution, it always works properly in an app, but not in a library. Any help would be greatly appreciated.
0
0
1.2k
Nov ’21
iOS AVAudioSession Notify Thread crash.
Good day community, More than half a year we faced the crash with following callstack: Crashed: AVAudioSession Notify Thread EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000000 0. libEmbeddedSystemAUs.dylib InterruptionListener(void*, unsigned int, unsigned int, void const*) 1. libEmbeddedSystemAUs.dylib InterruptionListener(void*, unsigned int, unsigned int, void const*) arrow_right 2. AudioToolbox AudioSessionPropertyListeners::CallPropertyListeners(unsigned int, unsigned int, void const*) + 596 3. AudioToolbox HandleAudioSessionCFTypePropertyChangedMessage(unsigned int, unsigned int, void*, unsigned int) + 1144 4. AudioToolbox ProcessDeferredMessage(unsigned int, __CFData const*, unsigned int, unsigned int) + 2452 5. AudioToolbox ASCallbackReceiver_AudioSessionPingMessage + 632 6. AudioToolbox _XAudioSessionPingMessage + 44 7. libAudioToolboxUtility.dylib mshMIGPerform + 264 8. CoreFoundation __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 56 9. CoreFoundation __CFRunLoopDoSource1 + 444 10. CoreFoundation __CFRunLoopRun + 1888 11. CoreFoundation CFRunLoopRunSpecific + 424 12. AVFAudio GenericRunLoopThread::Entry(void*) + 156 13. AVFAudio CAPThread::Entry(CAPThread*) + 204 14. libsystem_pthread.dylib _pthread_start + 156 15. libsystem_pthread.dylib thread_start + 8 We use Wwise audio framework as audio playback API. We did reported the problem to Audiokinetic's support, but it seems that the problem is not there. Also we used FMOD sound engine earlier, but we had the same issue. At this time we have around 100 crash events every day, which makes us upset. Looks like it started from iOS 13. My main problem is that I don't communicate with AudioToolbox or AVFAudio API directly but use thirdparty sound engines instead. I believe I am not the only who faced this problem. Also there is a discussion at https://forum.unity.com/threads/ios-12-crash-audiotoolbox.719675/ The last message deserves special attention: https://zhuanlan.zhihu.com/p/370791950 where Jeffrey Zhuang made a research. This might be helpful for Apple's support team. Any help is highly appreciated. Best regards, Sergey.
0
0
1.6k
Sep ’21
AudioUnit AudioComponentInstanceDispose crash
AudioUnit is kAudioUnitSubType_VoiceProcessingIO ExceptionHandling        0x7fff3bde6f31 -[NSExceptionHandler _handleException:mask:] + 364 ExceptionHandling        0x7fff3bde6cac NSExceptionHandlerUncaughtSignalHandler + 35 libsystem_platform.dylib    0x7fff203bad7d _sigtramp + 29 0x0000000000000000       0x7000043de580 0x0 + 123145373476224 CoreAudio            0x7fff220a1ee9 _ZN9HALDevice4DuckEfPK14AudioTimeStampf + 921 CoreAudio            0x7fff21c08598 AudioDeviceDuck + 843 AudioDSP            0x13ed3161f _Z14DuckOtherAudiojff + 51 AudioDSP            0x13ee64a3b _ZN16AUVoiceProcessor22DestroyAggregateDeviceEv + 829 AudioDSP            0x13ee65d59 _ZN16AUVoiceProcessorD2Ev + 415 AudioDSP            0x13ef43342 _ZN13ComponentBase8AP_CloseEPv + 30 AudioToolboxCore        0x7fff217b5c8c _ZN19APComponentInstance15disposeInstanceEv + 40 AudioToolboxCore        0x7fff218b92ef AudioComponentInstanceDispose + 40
0
0
664
Aug ’21
AudioUnit SDK
Hi All, The AudioUnit SDK is now available via GitHub, it is designed to be a slimmed down AudioUnit (version 2) focused replacement for the 'Core Audio Utility Classes', which should now be considered deprecated. Overview The AudioUnitSDK contains a set of base classes as well as utility sources required for Audio Unit development. These utility classes extend or wrap Core Audio API's providing developers with the essential scaffolding to create audio effects, instruments, and generators on Apple platforms. They provide an easier to implement C++ class model wrapping the C framework APIs. Link: AudioUnitSDK Jam
0
0
967
Jul ’21
How to start audio recording when app running on background?
I am working on audio recording. when application running on foreground i have to start audio recording and going to background at that time audio recording working fine. But my question is that how to start audio recording when i am already in background, My audio recording function fired like this: I have a Bluetooth LE device with buttons and an iOS app. Those two are paired (Bluetooth LE device and the iPhone which runs the iOS app) and the iOS app is listening for events on the Bluetooth LE device, events like a hit of a button. Now, when the user hits a button on the Bluetooth LE device, the iOS app captures the event and I am able to run code even if the app is in background, but I am not able to start a voice recording. I have already enable Background Modes: Here is my Code for Audio Recording: func startRecording() { DispatchQueue.global(qos: .background).asyncAfter(deadline: DispatchTime.now(), qos: .background) { let audioFilename = self.getDocumentsDirectory().appendingPathComponent("recording.m4a") print("record Audio \(audioFilename)") let settings = [ AVFormatIDKey: Int(kAudioFormatMPEG4AAC), AVSampleRateKey: 12000, AVNumberOfChannelsKey: 1, AVEncoderAudioQualityKey: AVAudioQuality.high.rawValue ] do { self.audioRecorder = try AVAudioRecorder(url: audioFilename, settings: settings) self.audioRecorder.delegate = self self.audioRecorder.record() } catch { self.finishRecording(success: false) } } } func getDocumentsDirectory() -> URL {     let paths = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)     return paths[0]   } I can't find proper solution to do that thing, Please suggest me proper way to do that, Thanks in Advance.
Replies
2
Boosts
0
Views
1.8k
Activity
Jan ’22
AU host crashes in IOThread in macOS 11 and later
Hi, I've problem with an AU host (based on Audio Toolbox/Core Audio, not AVFoundation) when running on macOS 11 or later and Apple Silicon – it crashes after some operations in GUI. The weird is, it crashes in IOThread. Could this be caused by some inappropriate operation in GUI (eg. outside the main thread) that effects the IOThread? Sounds quite improbable to me. And I did not find anything suspicious in the code. There are two logs in the debugger: [AUHostingService Client] connection interrupted. rt_sender::signal_wait failed: 89 ... And here is the crash log: Crash log: ... Thanks, Tomas
Replies
0
Boosts
0
Views
1.2k
Activity
Jan ’22
AVAudioEngine - output format has 0 channels after changing device of auAudioUnit of the inputNode
I'm trying to change device of the inputNode of AVAudioEngine. To do so, I'm calling setDeviceID on its auAudioUnit. Although this call doesn't fail, something wrong happens to the output busses. When I ask for its format, it shows a 0Hz and 0 channels format. It makes the app crash when I try to connect the node to the mainMixerNode. Can anyone explain what's wrong with this code? avEngine = AVAudioEngine() print(avEngine.inputNode.auAudioUnit.inputBusses[0].format) // <AVAudioFormat 0x1404b06e0: 2 ch, 44100 Hz, Float32, non-inter> print(avEngine.inputNode.auAudioUnit.outputBusses[0].format) // <AVAudioFormat 0x1404b0a60: 2 ch, 44100 Hz, Float32, inter> // Now, let's change a device from headphone's mic to built-in mic. try! avEngine.inputNode.auAudioUnit.setDeviceID(inputDevice.deviceID) print(avEngine.inputNode.auAudioUnit.inputBusses[0].format) // <AVAudioFormat 0x1404add50: 2 ch, 44100 Hz, Float32, non-inter> print(avEngine.inputNode.auAudioUnit.outputBusses[0].format) // <AVAudioFormat 0x1404adff0: 0 ch, 0 Hz, 'lpcm' (0x00000029) 32-bit little-endian float, deinterleaved> // !!! // Interestingly, 'inputNode' shows a different format than `auAudioUnit` print(avEngine.inputNode.inputFormat(forBus: 0)) // <AVAudioFormat 0x1404af480: 1 ch, 44100 Hz, Float32> print(avEngine.inputNode.outputFormat(forBus: 0)) // <AVAudioFormat 0x1404ade30: 1 ch, 44100 Hz, Float32> Edit: Further debugging revels another puzzling thing. avEngine.inputNode.auAudioUnit == avEngine.outputNode.auAudioUnit // this is true ?! inputNode and outputNode share the same AUAudioUnit. And its deviceID is by default set to the speakers. It's so confusing to me...why would inpudeNode's device be a speaker?
Replies
1
Boosts
0
Views
2.0k
Activity
Dec ’21
The output volume is abnormal when VPIO is switched to RemoteIO
The voice call in our game has such a usage scenario: when the player does not wear the headset or Bluetooth, we use the VPIO mode to turn on the microphone. On the contrary, the player wears the headset or Bluetooth, and the remoteIO mode is used to turn on the microphone. So we have a switch between VPIO and RemoteIO。When we only use RemoteIO (the player has been wearing headphones or Bluetooth since the game), the output volume does not change before and after the microphone is switched on. When we only use the VPIO mode (the player has not been wearing headphones or Bluetooth since the game), before and after turning on the microphone, the output volume will reduce a little (because turning on the microphone will cause the phone to enter the VPIO and the echo cancellation will be turned on), the performance of the output volume in the above two scenarios is normal。However, when we switched between VPIO and RemotoIO (the player didn’t wear headphones or Bluetooth at the beginning, and brought headphones or Bluetooth in the middle of the game), we encountered some problems: As long as I have used VPIO mode before RemotoIO mode, the output volume in RemoteIO mode after turning on the microphone will be the same as in VPIO mode (normally the output volume in RemoteIO should be greater than in VPIO mode), turn off the microphone ,The output volume will become normal.What confuses me is: My understanding is that when we use RemoteIO, the mobile phone should not do some suppression-like speech algorithms, so when we only use RemoteIO, the output volume of the mobile phone does not change. When we use VPIO, the mobile phone will use echo Algorithms, and perhaps dynamic compression and some gain algorithm processing. At this time, the output volume will be reduced to better handle the echo. This behavior is normal. However, when I switch between VPIO and RemotIO, I feel that when I use RemoteIO (VPIO resources are released), some of the previous VPIO algorithm processing is still reserved (may be dynamic compression or gain algorithm), which finally leads to the output volume under RemoteIO is the same as that under VPIO, and this only happens on all of IOS14, the previous version is normal (anytime you enter the remoteIO mode, the volume does not change). I want to know, For IOS14 this behavior (VPIO and RemoteIO switching causes the volume of RemoteIO to decrease) is normal? If it is not normal, how can we solve it?
Replies
1
Boosts
0
Views
1.3k
Activity
Nov ’21
AudioToolBox crash report only in iOS 12.3 above OS apple devices
From iOS 12.3 and above iOS versions we are getting AudioToolBox crashes, we do not know why these crashes are happening. We have Crashlytics Crash report but we are not able to debug the issue with the help of Crashlytics crash report.I have attached the Crashlytics crash report.Background of our application :Our application streams the video using RTSP url and VLC mobile kit. even when the application is sent to the background the streaming continues and the stream will try to reconnect when the stream disconnects due to some error.While streaming the video in the background we show the user a red bar on the user iPhone.We tried different scenarios to reproduce the issue some of them are1) we checked if it is happening when we receive a mobile call when the user is streaming2) We checked if interruptions from other streaming applications are causing the issue3) We checked if Siri or getting a face time call is creating the crashWe tried all the above mentioned in debugging, as well as release, buildsfind the crash report details belowJul 2019 11:18:45 GMT # Date: 2019-07-04T10:59:00Z # OS Version: 12.3.1 (16F203) # Device: iPhone 8 # RAM Free: 9.6% # Disk Free: 53.9% #22. Crashed: com.apple.coreaudio.auremoteio 0 AudioToolbox 0x18c489058 SampleRateConverter::SetProperty(unsigned int, unsigned int, void const*) + 192 1 AudioToolbox 0x18c669580 AudioConverterSetProperty + 96 2 AudioToolbox 0x18c51c638 AUConverterBase::SetupConverter(unsigned int, bool) + 1340 3 AudioToolbox 0x18c3fe948 AURemoteIO::SetupConverter(unsigned int, bool) + 224 4 AudioToolbox 0x18c51aed8 AUConverterBase::SetupAllConverters(bool, unsigned int) + 104 5 AudioToolbox 0x18c400a0c AURemoteIO::IOFormatsChanged(int) + 1420 6 AudioToolbox 0x18c402afc __AURIOCallbackReceiver_IOFormatsChanged_block_invoke + 96 7 libdispatch.dylib 0x187f80a38 _dispatch_call_block_and_release + 24 8 libdispatch.dylib 0x187f817d4 _dispatch_client_callout + 16 9 libdispatch.dylib 0x187f5cdec _dispatch_lane_serial_drain$VARIANT$armv81 + 548 10 libdispatch.dylib 0x187f5d92c _dispatch_lane_invoke$VARIANT$armv81 + 408 11 libdispatch.dylib 0x187f65e08 _dispatch_workloop_worker_thread + 584 12 libsystem_pthread.dylib 0x188161114 _pthread_wqthread + 304 13 libsystem_pthread.dylib 0x188163cd4 start_wqthread + 4 -- #0. com.apple.main-thread 0 AppName 0x101169978 _gnutls_ext_deinit + 417 (extensions.c:417) 1 AppName 0x10116f750 _gnutls_global_deinit + 416 (global.c:416) 2 (Missing) 0x1032313c0 (Missing) 3 (Missing) 0x10321a7b8 (Missing) 4 libsystem_c.dylib 0x188038bb4 __cxa_finalize_ranges + 384 5 libsystem_c.dylib 0x188038ec4 exit + 24 6 UIKitCore 0x1b4e4ed2c -[UIApplication terminateWithSuccess] + 466 7 UIKitCore 0x1b470adb4 __98-[__UICanvasLifecycleMonitor_Compatability deactivateEventsOnly:withContext:forceExit:completion:]_block_invoke.261 + 344 8 UIKitCore 0x1b4e52dec _runAfterCACommitDeferredBlocks + 296 9 UIKitCore 0x1b4e4193c _cleanUpAfterCAFlushAndRunDeferredBlocks + 352 10 UIKitCore 0x1b4e6e7ac _afterCACommitHandler + 116 11 CoreFoundation 0x1884d25f8 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32 12 CoreFoundation 0x1884cd320 __CFRunLoopDoObservers + 412 13 CoreFoundation 0x1884cd89c __CFRunLoopRun + 1228 14 CoreFoundation 0x1884cd0b0 CFRunLoopRunSpecific + 436 15 GraphicsServices 0x18a6cd79c GSEventRunModal + 104 16 UIKitCore 0x1b4e47978 UIApplicationMain + 212 17 AppName 0x1007fd1f4 main + 24 (AppDelegate.swift:24) 18 libdyld.dylib 0x187f928e0 start + 4 #1. com.apple.uikit.eventfetch-thread 0 libsystem_kernel.dylib 0x1880d30f4 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x1880d25a0 mach_msg + 72 2 CoreFoundation 0x1884d2a10 __CFRunLoopServiceMachPort + 236 3 CoreFoundation 0x1884cd920 __CFRunLoopRun + 1360 4 CoreFoundation 0x1884cd0b0 CFRunLoopRunSpecific + 436 5 Foundation 0x188e9afac -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 300 6 Foundation 0x188e9ae3c -[NSRunLoop(NSRunLoop) runUntilDate:] + 96 7 UIKitCore 0x1b4f2d494 -[UIEventFetcher threadMain] + 136 8 Foundation 0x188fc76a4 __NSThread__start__ + 984 9 libsystem_pthread.dylib 0x1881602c0 _pthread_body + 128 10 libsystem_pthread.dylib 0x188160220 _pthread_start + 44 11 libsystem_pthread.dylib 0x188163cdc thread_start + 4 #2. GAIThread 0 libsystem_kernel.dylib 0x1880d30f4 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x1880d25a0 mach_msg + 72 2 CoreFoundation 0x1884d2a10 __CFRunLoopServiceMachPort + 236 3 CoreFoundation 0x1884cd920 __CFRunLoopRun + 1360 4 CoreFoundation 0x1884cd0b0 CFRunLoopRunSpecific + 436 5 Foundation 0x188e9afac -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 300 6 Foundation 0x188ed646c -[NSRunLoop(NSRunLoop) run] + 88 7 AppName 0x100bc9d14 +[GAI threadMain:] + 4345896212 8 Foundation 0x188fc76a4 __NSThread__start__ + 984 9 libsystem_pthread.dylib 0x1881602c0 _pthread_body + 128 10 libsystem_pthread.dylib 0x188160220 _pthread_start + 44 11 libsystem_pthread.dylib 0x188163cdc thread_start + 4 #3. com.apple.CFSocket.private 0 libsystem_kernel.dylib 0x1880de328 __select + 8 1 CoreFoundation 0x1884db6f4 __CFSocketManager + 620 2 libsystem_pthread.dylib 0x1881602c0 _pthread_body + 128 3 libsystem_pthread.dylib 0x188160220 _pthread_start + 44 4 libsystem_pthread.dylib 0x188163cdc thread_start + 4 #4. com.twitter.crashlytics.ios.MachExceptionServer 0 AppName 0x100aded58 CLSProcessRecordAllThreads + 4344933720 1 AppName 0x100adf140 CLSProcessRecordAllThreads + 4344934720 2 AppName 0x100ace9bc CLSHandler + 4344867260 3 AppName 0x100ac9d9c CLSMachExceptionServer + 4344847772 4 libsystem_pthread.dylib 0x1881602c0 _pthread_body + 128 5 libsystem_pthread.dylib 0x188160220 _pthread_start + 44 6 libsystem_pthread.dylib 0x188163cdc thread_start + 4 #5. AVAudioSession Notify Thread 0 libsystem_kernel.dylib 0x1880d30f4 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x1880d25a0 mach_msg + 72 2 CoreFoundation 0x1884d2a10 __CFRunLoopServiceMachPort + 236 3 CoreFoundation 0x1884cd920 __CFRunLoopRun + 1360 4 CoreFoundation 0x1884cd0b0 CFRunLoopRunSpecific + 436 5 AVFAudio 0x18e3b5334 GenericRunLoopThread::Entry(void*) + 156 6 AVFAudio 0x18e3dfc60 CAPThread::Entry(CAPThread*) + 88 7 libsystem_pthread.dylib 0x1881602c0 _pthread_body + 128 8 libsystem_pthread.dylib 0x188160220 _pthread_start + 44 9 libsystem_pthread.dylib 0x188163cdc thread_start + 4 #6. com.apple.NSURLConnectionLoader 0 libsystem_kernel.dylib 0x1880d30f4 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x1880d25a0 mach_msg + 72 2 CoreFoundation 0x1884d2a10 __CFRunLoopServiceMachPort + 236 3 CoreFoundation 0x1884cd920 __CFRunLoopRun + 1360 4 CoreFoundation 0x1884cd0b0 CFRunLoopRunSpecific + 436 5 CFNetwork 0x188ae674c -[__CoreSchedulingSetRunnable runForever] + 216 6 Foundation 0x188fc76a4 __NSThread__start__ + 984 7 libsystem_pthread.dylib 0x1881602c0 _pthread_body + 128 8 libsystem_pthread.dylib 0x188160220 _pthread_start + 44 9 libsystem_pthread.dylib 0x188163cdc thread_start + 4 #7. Thread 0 libsystem_kernel.dylib 0x1880dffd8 poll + 8 1 CustomSDK 0x103661de8 _lws_plat_service_tsi + 236 2 CustomSDK 0x1036a3554 websocket_worker + 60 3 libsystem_pthread.dylib 0x1881602c0 _pthread_body + 128 4 libsystem_pthread.dylib 0x188160220 _pthread_start + 44 5 libsystem_pthread.dylib 0x188163cdc thread_start + 4 #8. Thread 0 libsystem_kernel.dylib 0x1880de9d4 __ulock_wait + 8 1 libdispatch.dylib 0x187f50c20 _dispatch_ulock_wait + 56 2 libdispatch.dylib 0x187f50d58 _dispatch_thread_event_wait_slow$VARIANT$armv81 + 48 3 libdispatch.dylib 0x187f628a8 __DISPATCH_WAIT_FOR_QUEUE__ + 336 4 libdispatch.dylib 0x187f624a8 _dispatch_sync_f_slow + 140 5 AppName 0x100c397e0 -[VLCEventManager startEventLoop] + 220 (VLCEventManager.m:220) 6 AppName 0x100c3916c EventDispatcherMainLoop + 97 (VLCEventManager.m:97) 7 libsystem_pthread.dylib 0x1881602c0 _pthread_body + 128 8 libsystem_pthread.dylib 0x188160220 _pthread_start + 44 9 libsystem_pthread.dylib 0x188163cdc thread_start + 4 #9. Thread 0 libsystem_kernel.dylib 0x1880d30f4 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x1880d25a0 mach_msg + 72 2 CoreFoundation 0x1884d2a10 __CFRunLoopServiceMachPort + 236 3 CoreFoundation 0x1884cd920 __CFRunLoopRun + 1360 4 CoreFoundation 0x1884cd0b0 CFRunLoopRunSpecific + 436 5 CustomSDK 0x103634e60 -[P2PCamera worker] + 88 6 Foundation 0x188fc76a4 __NSThread__start__ + 984 7 libsystem_pthread.dylib 0x1881602c0 _pthread_body + 128 8 libsystem_pthread.dylib 0x188160220 _pthread_start + 44 9 libsystem_pthread.dylib 0x188163cdc thread_start + 4 #10. Thread 0 libsystem_kernel.dylib 0x1880de328 __select + 8 1 CustomSDK 0x103776534 pj_sock_select + 84 2 CustomSDK 0x103772340 pj_ioqueue_poll + 196 3 CustomSDK 0x103699bc4 _pjice_worker_thread + 172 4 CustomSDK 0x10377329c thread_main + 84 5 libsystem_pthread.dylib 0x1881602c0 _pthread_body + 128 6 libsystem_pthread.dylib 0x188160220 _pthread_start + 44 7 libsystem_pthread.dylib 0x188163cdc thread_start + 4 #11. Thread 0 libsystem_kernel.dylib 0x1880de328 __select + 8 1 CustomSDK 0x103776534 pj_sock_select + 84 2 CustomSDK 0x103772340 pj_ioqueue_poll + 196 3 CustomSDK 0x103699bc4 _pjice_worker_thread + 172 4 CustomSDK 0x10377329c thread_main + 84 5 libsystem_pthread.dylib 0x1881602c0 _pthread_body + 128 6 libsystem_pthread.dylib 0x188160220 _pthread_start + 44 7 libsystem_pthread.dylib 0x188163cdc thread_start + 4 #12. Thread 0 libsystem_kernel.dylib 0x1880de328 __select + 8 1 CustomSDK 0x103776534 pj_sock_select + 84 2 CustomSDK 0x103772340 pj_ioqueue_poll + 196 3 CustomSDK 0x103699bc4 _pjice_worker_thread + 172 4 CustomSDK 0x10377329c thread_main + 84 5 libsystem_pthread.dylib 0x1881602c0 _pthread_body + 128 6 libsystem_pthread.dylib 0x188160220 _pthread_start + 44 7 libsystem_pthread.dylib 0x188163cdc thread_start + 4 #13. Thread 0 libsystem_kernel.dylib 0x1880de400 __semwait_signal + 8 1 libsystem_c.dylib 0x18805556c nanosleep + 212 2 libsystem_c.dylib 0x18805536c sleep + 44 3 CustomSDK 0x103697a08 _port_forward_conn_thread + 132 4 libsystem_pthread.dylib 0x1881602c0 _pthread_body + 128 5 libsystem_pthread.dylib 0x188160220 _pthread_start + 44 6 libsystem_pthread.dylib 0x188163cdc thread_start + 4 #14. Thread 0 libsystem_kernel.dylib 0x1880de328 __select + 8 1 CustomSDK 0x103697e88 _port_forward_io_thread + 740 2 libsystem_pthread.dylib 0x1881602c0 _pthread_body + 128 3 libsystem_pthread.dylib 0x188160220 _pthread_start + 44 4 libsystem_pthread.dylib 0x188163cdc thread_start + 4 #15. Thread 0 libsystem_kernel.dylib 0x1880de328 __select + 8 1 AppName 0x101be7740 BasicTaskScheduler::SingleStep(unsigned int) + 91 (BasicTaskScheduler.cpp:91) 2 AppName 0x101be70d0 BasicTaskScheduler0::doEventLoop(char volatile*) + 79 (BasicTaskScheduler0.cpp:79) 3 AppName 0x101d6086c Demux(demux_t*) + 1420 (live555.cpp:1420) 4 libsystem_pthread.dylib 0x188160220 _pthread_start + 44 5 libsystem_pthread.dylib 0x188163cdc thread_start + 4 #16. Thread 0 libsystem_kernel.dylib 0x1880ddee4 __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x18815d4d8 _pthread_cond_wait$VARIANT$armv81 + 680 2 AppName 0x100cc08a8 vlc_cond_timedwait + 263 (thread.c:263) 3 AppName 0x100cbff40 vlc_timer_thread + 85 (timer.c:85) 4 libsystem_pthread.dylib 0x1881602c0 _pthread_body + 128 5 libsystem_pthread.dylib 0x188160220 _pthread_start + 44 6 libsystem_pthread.dylib 0x188163cdc thread_start + 4 #17. Thread 0 libsystem_kernel.dylib 0x1880d3130 semaphore_wait_trap + 8 1 AppName 0x100c93ad4 aout_DecPlay + 212 (dec.c:212) 2 libsystem_pthread.dylib 0x188160220 _pthread_start + 44 3 libsystem_pthread.dylib 0x188163cdc thread_start + 4 #18. Thread 0 libsystem_kernel.dylib 0x1880ddee4 __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x18815d4a4 _pthread_cond_wait$VARIANT$armv81 + 628 2 AppName 0x100c78220 DecoderThread + 1596 (decoder.c:1596) 3 libsystem_pthread.dylib 0x188160220 _pthread_start + 44 4 libsystem_pthread.dylib 0x188163cdc thread_start + 4 #19. AURemoteIO::IOThread 0 libsystem_kernel.dylib 0x1880d30f4 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x1880d25a0 mach_msg + 72 2 AudioToolbox 0x18c401890 AURemoteIO::IOThread::Run() + 256 3 AudioToolbox 0x18c406800 AURemoteIO::IOThread::Entry(void*) + 76 4 AudioToolbox 0x18c7d94f8 CAPThread::Entry(CAPThread*) + 88 5 libsystem_pthread.dylib 0x1881602c0 _pthread_body + 128 6 libsystem_pthread.dylib 0x188160220 _pthread_start + 44 7 libsystem_pthread.dylib 0x188163cdc thread_start + 4 #20. Thread 0 libsystem_kernel.dylib 0x1880deb74 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x1881611f8 _pthread_wqthread + 532 2 libsystem_pthread.dylib 0x188163cd4 start_wqthread + 4 #21. Thread 0 libsystem_kernel.dylib 0x1880deb74 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x188161138 _pthread_wqthread + 340 2 libsystem_pthread.dylib 0x188163cd4 start_wqthread + 4 #22. Crashed: com.apple.coreaudio.auremoteio 0 AudioToolbox 0x18c489058 SampleRateConverter::SetProperty(unsigned int, unsigned int, void const*) + 192 1 AudioToolbox 0x18c669580 AudioConverterSetProperty + 96 2 AudioToolbox 0x18c51c638 AUConverterBase::SetupConverter(unsigned int, bool) + 1340 3 AudioToolbox 0x18c3fe948 AURemoteIO::SetupConverter(unsigned int, bool) + 224 4 AudioToolbox 0x18c51aed8 AUConverterBase::SetupAllConverters(bool, unsigned int) + 104 5 AudioToolbox 0x18c400a0c AURemoteIO::IOFormatsChanged(int) + 1420 6 AudioToolbox 0x18c402afc __AURIOCallbackReceiver_IOFormatsChanged_block_invoke + 96 7 libdispatch.dylib 0x187f80a38 _dispatch_call_block_and_release + 24 8 libdispatch.dylib 0x187f817d4 _dispatch_client_callout + 16 9 libdispatch.dylib 0x187f5cdec _dispatch_lane_serial_drain$VARIANT$armv81 + 548 10 libdispatch.dylib 0x187f5d92c _dispatch_lane_invoke$VARIANT$armv81 + 408 11 libdispatch.dylib 0x187f65e08 _dispatch_workloop_worker_thread + 584 12 libsystem_pthread.dylib 0x188161114 _pthread_wqthread + 304 13 libsystem_pthread.dylib 0x188163cd4 start_wqthread + 4 #23. Thread 0 libsystem_kernel.dylib 0x1880deb74 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x188161138 _pthread_wqthread + 340 2 libsystem_pthread.dylib 0x188163cd4 start_wqthread + 4 #24. Thread 0 libsystem_kernel.dylib 0x1880deb74 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x1881611f8 _pthread_wqthread + 532 2 libsystem_pthread.dylib 0x188163cd4 start_wqthread + 4 #25. Thread 0 libsystem_kernel.dylib 0x1880deb74 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x1881611f8 _pthread_wqthread + 532 2 libsystem_pthread.dylib 0x188163cd4 start_wqthread + 4 #26. AURemoteIO::IOThread 0 libsystem_kernel.dylib 0x1880d30f4 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x1880d25a0 mach_msg + 72 2 AudioToolbox 0x18c401890 AURemoteIO::IOThread::Run() + 256 3 AudioToolbox 0x18c406800 AURemoteIO::IOThread::Entry(void*) + 76 4 AudioToolbox 0x18c7d94f8 CAPThread::Entry(CAPThread*) + 88 5 libsystem_pthread.dylib 0x1881602c0 _pthread_body + 128 6 libsystem_pthread.dylib 0x188160220 _pthread_start + 44 7 libsystem_pthread.dylib 0x188163cdc thread_start + 4
Replies
13
Boosts
0
Views
6.8k
Activity
Nov ’21
How to process the audio bufferList with AVAudioEngine?
I have an AVMutableAudioMix and use MTAudioProcessingTap to process the audio data.But After I pass the buffer to AVAudioEngine and to render it with renderOffline,the audio has no any effects...How can I do it? Any idea? Here is the code for MTAudioProcessingTapProcessCallback var callback = MTAudioProcessingTapCallbacks(version: kMTAudioProcessingTapCallbacksVersion_0, clientInfo:UnsafeMutableRawPointer(Unmanaged.passUnretained(self.engine).toOpaque()), init: tapInit, finalize: tapFinalize, prepare: tapPrepare, unprepare: tapUnprepare) { tap, numberFrames, flags, bufferListInOut, numberFramesOut, flagsOut in                       guard MTAudioProcessingTapGetSourceAudio(tap, numberFrames, bufferListInOut, flagsOut, nil, numberFramesOut) == noErr else {         preconditionFailure()       }       let storage = MTAudioProcessingTapGetStorage(tap)       let engine = Unmanaged<Engine>.fromOpaque(storage).takeUnretainedValue()       // render the audio with effect       engine.render(bufferPtr: bufferListInOut,numberOfFrames: numberFrames)     } And here is the Engine code class Engine {   let engine = AVAudioEngine()       let player = AVAudioPlayerNode()   let pitchEffect = AVAudioUnitTimePitch()   let reverbEffect = AVAudioUnitReverb()   let rateEffect = AVAudioUnitVarispeed()   let volumeEffect = AVAudioUnitEQ()   let format = AVAudioFormat(commonFormat: .pcmFormatFloat32, sampleRate: 44100, channels: 2, interleaved: false)!   init() {     engine.attach(player)     engine.attach(pitchEffect)     engine.attach(reverbEffect)     engine.attach(rateEffect)     engine.attach(volumeEffect)           engine.connect(player, to: pitchEffect, format: format)     engine.connect(pitchEffect, to: reverbEffect, format: format)     engine.connect(reverbEffect, to: rateEffect, format: format)     engine.connect(rateEffect, to: volumeEffect, format: format)     engine.connect(volumeEffect, to: engine.mainMixerNode, format: format)           try! engine.enableManualRenderingMode(.offline, format: format, maximumFrameCount: 4096)           reverbEffect.loadFactoryPreset(AVAudioUnitReverbPreset.largeRoom2)     reverbEffect.wetDryMix = 100     pitchEffect.pitch = 2100           try! engine.start()     player.play()   }       func render(bufferPtr:UnsafeMutablePointer<AudioBufferList>,numberOfFrames:CMItemCount) {     let buffer = AVAudioPCMBuffer(pcmFormat: format, frameCapacity: 4096)!     buffer.frameLength = AVAudioFrameCount(numberOfFrames)     buffer.mutableAudioBufferList.pointee = bufferPtr.pointee     self.player.scheduleBuffer(buffer) {       try! self.engine.renderOffline(AVAudioFrameCount(numberOfFrames), to: buffer)     }   } }
Replies
0
Boosts
0
Views
1.6k
Activity
Nov ’21
How to pass custom object in MTAudioProcessingTapCallbacks?
I wrote the code below to pass my custom object Engine in MTAudioProcessingTapCallbacks Here is code: func getTap() -> MTAudioProcessingTap? {     var tap: Unmanaged<MTAudioProcessingTap>?           func onInit(tap:MTAudioProcessingTap,clientInfo:UnsafeMutableRawPointer?,tagStroageOut:UnsafeMutablePointer<UnsafeMutableRawPointer?>) {               let engine = Engine()       tagStroageOut.pointee = Unmanaged<Engine>.passUnretained(engine).toOpaque()     }                 var callback = MTAudioProcessingTapCallbacks(version: kMTAudioProcessingTapCallbacksVersion_0, clientInfo:nil, init: onInit, finalize: nil, prepare: nil, unprepare: nil) { tap, numberFrames, flags, bufferListInOut, numberFramesOut, flagsOut in               guard MTAudioProcessingTapGetSourceAudio(tap, numberFrames, bufferListInOut, flagsOut, nil, numberFramesOut) == noErr else {         preconditionFailure()       }               let storage = MTAudioProcessingTapGetStorage(tap)       let engine = Unmanaged<Engine>.fromOpaque(storage).takeUnretainedValue()               // This line crashed :       // ClientProcessingTapManager (14): EXC_BAD_ACCESS (code=1, address=0x544453e46ea0)       engine.dealWith(bufferPtr: bufferListInOut)     }     guard MTAudioProcessingTapCreate(kCFAllocatorDefault, &callback, kMTAudioProcessingTapCreationFlag_PostEffects, &tap) == noErr else{       fatalError()     }     return tap?.takeRetainedValue()   } } How can I do it?
Replies
1
Boosts
0
Views
1.4k
Activity
Nov ’21
How to export audio file from `AVAudioEngine`
I have an AVAudioEngine,but I don't know how to export the audio in AVAudioEngine to a file. Anyone can help?
Replies
0
Boosts
0
Views
1.2k
Activity
Nov ’21
How to play audio from NSData in a library in Objective C
I'm trying to play an audio content built from NSData inside a library (.a). It works properly when my code is inside an app. But it is not working when in a library, I get no error and no sound playing. NSError * errorAudio = nil; NSError * errorFile; // Clear all cache NSArray* tmpDirectory = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:NSTemporaryDirectory() error:NULL]; for (NSString *file in tmpDirectory) {     [[NSFileManager defaultManager] removeItemAtPath:[NSString stringWithFormat:@"%@%@", NSTemporaryDirectory(), file] error:NULL]; } // Set temporary directory and temporary file NSURL * tmpDirURL = [NSURL fileURLWithPath:NSTemporaryDirectory() isDirectory:YES]; NSURL * soundFileURL = [[tmpDirURL URLByAppendingPathComponent:@"temp"] URLByAppendingPathExtension:@"wav"]; [[NSFileManager defaultManager] createDirectoryAtURL:tmpDirURL withIntermediateDirectories:NO attributes:nil error:&amp;errorFile]; // Write NSData to temporary file NSString *path= [soundFileURL path]; [audioToPlay writeToFile:path options:NSDataWritingAtomic error:&amp;errorFile]; if (errorFile) {     // Error while writing NSData } else {     // Init audio player     self.audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:soundFileURL error:&amp;errorAudio];     if (errorAudio) {         // Audio player could not be initialized     } else {         // Audio player was initialized correctly         [audioPlayer prepareToPlay];         [audioPlayer stop];         [audioPlayer setCurrentTime:0];         [audioPlayer play];     } } I don't check errorFile intros piece of code, but when debugging I can see that value is nil. My header file #import &lt;AudioToolbox/AudioToolbox.h&gt; #import &lt;AVFoundation/AVFoundation.h&gt; @property(nonatomic, strong) AVAudioPlayer * audioPlayer; My m file #import &lt;AudioToolbox/AudioToolbox.h&gt; #import &lt;AVFoundation/AVFoundation.h&gt; @synthesize audioPlayer; I've been checking for dozens of posts but cannot find any solution, it always works properly in an app, but not in a library. Any help would be greatly appreciated.
Replies
0
Boosts
0
Views
1.2k
Activity
Nov ’21
Recurring tap on Garage Band recording
Why is there a tapping sound when I record audio in Garage Band? Same when I import and play an mp3 track. How can I stop it?
Replies
1
Boosts
0
Views
517
Activity
Oct ’21
Audio Recording failing for longer duration
We are trying to record audio for time more than 6 hours. The app is working for 2 to 3 hours, but if I record it more than 4 or 5 hours, the recording is failing. I have. enough space on my device.We are using AVAudioRecorder. Appreciate your help
Replies
0
Boosts
0
Views
495
Activity
Sep ’21
iOS AVAudioSession Notify Thread crash.
Good day community, More than half a year we faced the crash with following callstack: Crashed: AVAudioSession Notify Thread EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000000 0. libEmbeddedSystemAUs.dylib InterruptionListener(void*, unsigned int, unsigned int, void const*) 1. libEmbeddedSystemAUs.dylib InterruptionListener(void*, unsigned int, unsigned int, void const*) arrow_right 2. AudioToolbox AudioSessionPropertyListeners::CallPropertyListeners(unsigned int, unsigned int, void const*) + 596 3. AudioToolbox HandleAudioSessionCFTypePropertyChangedMessage(unsigned int, unsigned int, void*, unsigned int) + 1144 4. AudioToolbox ProcessDeferredMessage(unsigned int, __CFData const*, unsigned int, unsigned int) + 2452 5. AudioToolbox ASCallbackReceiver_AudioSessionPingMessage + 632 6. AudioToolbox _XAudioSessionPingMessage + 44 7. libAudioToolboxUtility.dylib mshMIGPerform + 264 8. CoreFoundation __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 56 9. CoreFoundation __CFRunLoopDoSource1 + 444 10. CoreFoundation __CFRunLoopRun + 1888 11. CoreFoundation CFRunLoopRunSpecific + 424 12. AVFAudio GenericRunLoopThread::Entry(void*) + 156 13. AVFAudio CAPThread::Entry(CAPThread*) + 204 14. libsystem_pthread.dylib _pthread_start + 156 15. libsystem_pthread.dylib thread_start + 8 We use Wwise audio framework as audio playback API. We did reported the problem to Audiokinetic's support, but it seems that the problem is not there. Also we used FMOD sound engine earlier, but we had the same issue. At this time we have around 100 crash events every day, which makes us upset. Looks like it started from iOS 13. My main problem is that I don't communicate with AudioToolbox or AVFAudio API directly but use thirdparty sound engines instead. I believe I am not the only who faced this problem. Also there is a discussion at https://forum.unity.com/threads/ios-12-crash-audiotoolbox.719675/ The last message deserves special attention: https://zhuanlan.zhihu.com/p/370791950 where Jeffrey Zhuang made a research. This might be helpful for Apple's support team. Any help is highly appreciated. Best regards, Sergey.
Replies
0
Boosts
0
Views
1.6k
Activity
Sep ’21
AudioUnit AudioComponentInstanceDispose crash
AudioUnit is kAudioUnitSubType_VoiceProcessingIO ExceptionHandling        0x7fff3bde6f31 -[NSExceptionHandler _handleException:mask:] + 364 ExceptionHandling        0x7fff3bde6cac NSExceptionHandlerUncaughtSignalHandler + 35 libsystem_platform.dylib    0x7fff203bad7d _sigtramp + 29 0x0000000000000000       0x7000043de580 0x0 + 123145373476224 CoreAudio            0x7fff220a1ee9 _ZN9HALDevice4DuckEfPK14AudioTimeStampf + 921 CoreAudio            0x7fff21c08598 AudioDeviceDuck + 843 AudioDSP            0x13ed3161f _Z14DuckOtherAudiojff + 51 AudioDSP            0x13ee64a3b _ZN16AUVoiceProcessor22DestroyAggregateDeviceEv + 829 AudioDSP            0x13ee65d59 _ZN16AUVoiceProcessorD2Ev + 415 AudioDSP            0x13ef43342 _ZN13ComponentBase8AP_CloseEPv + 30 AudioToolboxCore        0x7fff217b5c8c _ZN19APComponentInstance15disposeInstanceEv + 40 AudioToolboxCore        0x7fff218b92ef AudioComponentInstanceDispose + 40
Replies
0
Boosts
0
Views
664
Activity
Aug ’21
AudioUnit SDK
Hi All, The AudioUnit SDK is now available via GitHub, it is designed to be a slimmed down AudioUnit (version 2) focused replacement for the 'Core Audio Utility Classes', which should now be considered deprecated. Overview The AudioUnitSDK contains a set of base classes as well as utility sources required for Audio Unit development. These utility classes extend or wrap Core Audio API's providing developers with the essential scaffolding to create audio effects, instruments, and generators on Apple platforms. They provide an easier to implement C++ class model wrapping the C framework APIs. Link: AudioUnitSDK Jam
Replies
0
Boosts
0
Views
967
Activity
Jul ’21
Audio queue start failed when there comes a Interrupt
my program works well ,and had handle the interrupetion,but sometimes Audio queue start failed with a status code 561145187, how to slove this problem
Replies
0
Boosts
0
Views
468
Activity
Jul ’21