简体   繁体   中英

iPhone AVAudioRecorder, AudioQueueServices, how to auto record audio when sound is detected

i'm using AVAudioRecorder and AudioQueueServices to record audio from the iphone's mic but I want to auto record the sound once it is detected so theres no need to press on a record button

I've looked at a tutorial about the AVFoundation: www.iphoneam.com/blog/index.php?title=using-the-iphone-to-record-audio-a-guide&more=1&c=1&tb=1&pb=1 and also a tutorial that explains how the iphone mic can detect sound levels, i've tried adding the two tutorials together but i cant get the code to work at all

Can't figure out what to do and i'm not sure if i'm taking the wrong approach

Any advice?

Thanks

Check out this tutorial: http://mobileorchard.com/tutorial-detecting-when-a-user-blows-into-the-mic/

I got something similar working using the above tutorial. I have one AVAudioRecorder monitoring the mic's volume and another that records the mic's input when a certain threshold is reached.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM