Record and Play sound at same time IOS

Stephen MacLean smaclean at madmansoft.com
Sat Apr 26 22:52:41 EDT 2014


No worries:)

Yes, it actually does. There is a file, with the proper format, so it can be "played". If you use some of the other mergAV commands to get the duration you'd probably find that it's of zero length or duration. 

So you are "playing" it, but it since there is no length and nothing in it, your player plays exactly what is in the file... nothing and therefore no audio. Once you stop recording to that file, the data is written out to it, "filling it out". If you now play it, you still get exactly what's in the file... but now it has length and data so you get audio.

Hope that helps!

Best,

Steve

On Apr 26, 2014, at 10:34 PM, Nakia Brewer <Nakia.Brewer at westrac.com.au> wrote:

> Ah okay, that doesn't explain why it can be played though does it ?
> 
> Maybe when I play it this cancels the recording ?
> 
> Not meaning to question/interrogate your findings, I'm just curious really...
> 
> Sent from my iPhone
> 
>> On 27 Apr 2014, at 12:31 pm, "Stephen MacLean" <smaclean at madmansoft.com> wrote:
>> 
>> T'was fun:) And since I'd just spent a bunch of time building recording and playback into my app, it was pretty fresh.
>> 
>> Running in the iOS simulator, you can see what's being written to the cache (Your user account > Library > Application Support > iPhone Simulator > the os version you are running on the simulator > The UUID of your app > Library > Caches).
>> 
>> While the file was created when I started recording, by watching the file I could see that it wasn't growing in size until I stopped recording. Which meant data wasn't being dumped to until then. So while there was a file to play, there was no data to be played.
>> 
>> Best,
>> 
>> Steve






More information about the use-livecode mailing list