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

Re: Reading packets from an audio file


  • Subject: Re: Reading packets from an audio file
  • From: William Stewart <email@hidden>
  • Date: Mon, 16 Feb 2009 11:32:34 -0800


On Feb 15, 2009, at 9:28 PM, rethish wrote:

Hi all,

I need to append an newly recorded audio file with the end of an existing  file.

I use the function ,     
AudioFileOpenURL (   CFURLRef        inFileRef,   SInt8           inPermissions,
                                   AudioFileTypeID inFileTypeHint,   AudioFileID     *outAudioFile);
by setting read write permission to do it.

My idea is to  count  the packet number of the existing file and set it as the starting packet number of the recording file

Is there any function to get the packet number of the audio file?

I had found a function ,

AudioFileGetProperty (   AudioFileID         inAudioFile,   AudioFilePropertyID   inPropertyID,   
                        UInt32        *ioDataSize,  void                *outPropertyData);

But this function doesn’t return the correct packet number.

What property are you using? We use the get number of packets property (kAudioFilePropertyAudioDataPacketCount) all the time and this is always correct


When I am setting the starting packet number (some integer number like 49152) manually, the recording file can be appended with the existing file starting from that packet number.

 Is I am going in a correct way?

This isn't going to work for all foramts/file types - it should work ok if you are just dealing with linear pcm

Bill
\
 _______________________________________________
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: Reading packets from an audio file
      • From: rethish <email@hidden>
References: 
 >Reading packets from an audio file (From: rethish <email@hidden>)

  • Prev by Date: Re: Loop Audio on iPhone
  • Next by Date: Re: Converting to mp3 in iPhone sdk
  • Previous by thread: Reading packets from an audio file
  • Next by thread: Re: Reading packets from an audio file
  • Index(es):
    • Date
    • Thread