开发者

Where is the file of the recording located on the iPhone SpeakHere example?

开发者 https://www.devze.com 2023-02-10 05:48 出处:网络
It is as simple as that. When you use the SpeakHere example it should create a file somewhere on the iPhone that contains the data from the recording.

It is as simple as that.

When you use the SpeakHere example it should create a file somewhere on the iPhone that contains the data from the recording.

Does anyone know how I can find this?

Thanks!


EDIT 1

To be clear, I want to do operations on the wav file within my application. I have some code that needs the URL of a wav file. What would that be in the SpeakHere example? (Keep in mind this is all within the same app).


EDIT 2

I appreciate the suggestion @sudo rm -rf, but I would really like to stick to th开发者_如何学Goe SpeakHere example as it serves my purpose well. Have you looked at the mRecordFile variable in AQRecorder.mm? Could that be it?


Well, I tried the app and it looks like it doesn't even save it to disk (it should be in the Documents directory); I'm not sure how it's holding it. Maybe in memory? Anyway, if I were you, I'd not use that sample code for recording audio. It's meant for iOS 2, and is quite outdated. Try visiting THIS question and read about how to use AVAudioRecorder.


Edit: Found where it saves the audio file to recordedFile.caf. However, it's saving it to a temporary directory. So, to access it you need to use:

recordFilePath = (CFStringRef)[NSTemporaryDirectory() stringByAppendingPathComponent: @"recordedFile.caf"];
    player->CreateQueueForFile(recordFilePath);


An App can only store data inside it's own sandbox. This means, it's stored inside the bundle of your example App and can't be read by any other App, except by the example App.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号