2

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 the SpeakHere example as it serves my purpose well. Have you looked at the mRecordFile variable in AQRecorder.mm? Could that be it?

Eric Brotto
  • 53,471
  • 32
  • 129
  • 174

2 Answers2

3

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);
Community
  • 1
  • 1
sudo rm -rf
  • 29,408
  • 19
  • 102
  • 161
  • Your edit looks great! So I am assuming that I could pass recordFilePath as an argument to a function requiring the name and location of the file? – Eric Brotto Feb 10 '11 at 16:15
  • Ah! I just found it in the SpeakHereController.mm! Nice work! – Eric Brotto Feb 10 '11 at 16:17
  • @Eric: Yes, I believe that's what you can do. In this case, `player` is an `AQPlayer` object. By the way, the code above came from `SpeakHereController.mm`. **Edit:** Oops, you beat me to it. :) – sudo rm -rf Feb 10 '11 at 16:18
0

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.

Björn Kaiser
  • 9,882
  • 4
  • 37
  • 57