I’m in the process of working on my very first programming project, a simple voice notes app that should be able to:
- Create notes
- Edit existing notes
- Delete notes
- Show a list of notes currently saved on the device (list table view?)
- Persist notes on the device between sessions (Documents folder persists across sessions)
I’m having a bit of trouble understanding how to create and save a new audio file.
I’ve gone over the “simple audio recorder” example and understand that r = media.newRecording(filePath) creates a new audio file in the Documents directory using the value stored in dataFileName. The r:startRecording() then uses that file to record into.
However, this example only creates one file that gets recorded into over and over. I’m interested in creating a new audio file each time a recording is started.
I’ve been messing around with various code for a few days now and my newbie brain just can’t seem to get anything working properly.
I think my three main concerns are:
- how do I create a unique newRecording object for every recording?
- how do I save it to the Documents folder without overwriting the previous file?
- how does the startRecording method know which file to record into if multiple files exist?
Can someone help me with a jumping off point? I would be immensely grateful.
Thanks,
- Mike
[import]uid: 14700 topic_id: 28681 reply_id: 328681[/import]