• 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: Truncating an audio file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Truncating an audio file


  • Subject: Re: Truncating an audio file
  • From: Steve Bird <email@hidden>
  • Date: Fri, 02 Aug 2013 09:47:28 -0400

On Aug 2, 2013, at 8:45 AM, Paul Davis wrote:
> - The user is working with the application, all the while recording to file (asynchronously)
> - He can pause his work for up to 60 seconds without stopping the recording process.
> - If he resumes audio output within 60 seconds, the recording simply continues (containing the silent part in the middle)
> - If the audio output is not resumed, the recording is closed and the final seconds of silence should not reach / or be removed from the file.
>
> It seems that I should build a 'buffered recorder' with room for at least 60 seconds of audio.

Exactly.  If 60 seconds is your magic number, then store the audio output into a 60-second buffer.
If you're adding 1 second at a time, then check before storing, if it's full.
If it's full, then write the oldest 1-second chunk out and overwrite it with the new stuff.

At closing time you'll need to scan BACKWARDS thru the buffer and search for non-silence.  Write out everything up thru that last non-slience and discard the rest.


----------------------------------------------------------------
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
www.Culverson.com                     (toll free) 1-877-676-8175



 _______________________________________________
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


References: 
 >Re: Truncating an audio file (From: Brian Willoughby <email@hidden>)
 >Re: Truncating an audio file (From: Paul Davis <email@hidden>)
 >Re: Truncating an audio file (From: patrick machielse <email@hidden>)
 >Re: Truncating an audio file (From: Paul Davis <email@hidden>)

  • Prev by Date: Re: Truncating an audio file
  • Next by Date: set kAudioFilePropertyAlbumArtwork: fail
  • Previous by thread: Re: Truncating an audio file
  • Next by thread: set kAudioFilePropertyAlbumArtwork: fail
  • Index(es):
    • Date
    • Thread