• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: playing a growing file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: playing a growing file


  • Subject: Re: playing a growing file
  • From: "Dave O'Neill" <email@hidden>
  • Date: Fri, 24 Jul 2015 11:43:14 -0700

One way to do it is to create an AudioFileID open for reading and writing using the Audio File Services Reference https://developer.apple.com/library/mac/documentation/MusicAudio/Reference/AudioFileConvertRef/ Then you create a ExtAudioFileID for reading only using ExtAudioFileWrapAudioFileID. This actually works, but writing to Audio file isn't that straightforward if it's not LPCM. 

On Fri, Jul 24, 2015 at 9:44 AM, Matthew Pease <email@hidden> wrote:
Hi all -

I've searched for a previous answer to this question, but did not find one.

In my IOS app, I record a stream to a file.   I then want to provide playback access to that file starting from any offset.  The user can listen to any part of that file by dragging a slider.

The problem is that the file is continuously growing while the new stream data arrives & is appended to the file.

ExtAudioFileSeek says that its behavior is undefined for files that are open for writing.  Also when I play the file back, I might move past a point which was the end of the file when the file was originally opened.

I suppose one way I could do it would be to continuously close & open the file.  open to write, then close it.   And then open it again to read the next part of the stream.  I can make the file an uncompressed format so that seeking within the file will be fast.

Does this sound like a good plan?  Any other possibilties?


Thank you-
Matt

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: playing a growing file
      • From: Matthew Pease <email@hidden>
References: 
 >playing a growing file (From: Matthew Pease <email@hidden>)

  • Prev by Date: playing a growing file
  • Next by Date: Re: playing a growing file
  • Previous by thread: playing a growing file
  • Next by thread: Re: playing a growing file
  • Index(es):
    • Date
    • Thread