• 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: Ring buffer design for MP3 (et. al.) playback
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ring buffer design for MP3 (et. al.) playback


  • Subject: Re: Ring buffer design for MP3 (et. al.) playback
  • From: "Andreas Falkenhahn" <email@hidden>
  • Date: Mon, 15 Oct 2007 20:41:43 +0200

On 15.10.2007 at 10:26 Richard Powell wrote:

>Hello Andreas,
>
>A suggestion: Maybe you can track how many buffers have been
>decoded?  For MP3 and AAC the number of frames decoded is constant
>through-out the life of the file.  I'm almost positive that it is
>1158 samples for each MP3 frame and 1024 for each AAC frame.  The
>stream is not allowed to "switch it up" during the playback.  How
>much time 1024 samples is depends on the framerate.  This way you can
>know how much time has passed (although it will be "quantized" to the
>frame size).

No, that won't work because my feeder thread decodes frames in chunks
of 1 second of audio data. Thus, time calculated on the basis of how many
frames have been decoded will be pretty unprecise. I want to have
millisecond precision.

Any other suggestions? As I said, I already have a solution that works
and it is also pretty precise. I'm taking the time in the notification proc
on kAudioUnitRenderAction_PreRender, and then use this as the basis
for determining how long the audio has been playing. I'm just wondering
if there's a nicer solution, but if there isn't, I could also live with the current
one.

Andreas

 _______________________________________________
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: Ring buffer design for MP3 (et. al.) playback
      • From: William Stewart <email@hidden>
References: 
 >Ring buffer design for MP3 (et. al.) playback (From: "Andreas Falkenhahn" <email@hidden>)
 >Re: Ring buffer design for MP3 (et. al.) playback (From: "Andreas Falkenhahn" <email@hidden>)

  • Prev by Date: Is it possible to translate old session data?
  • Next by Date: Re: Audio converting code working on 10.3 and 10.4 - broken on 10.5
  • Previous by thread: Re: Ring buffer design for MP3 (et. al.) playback
  • Next by thread: Re: Ring buffer design for MP3 (et. al.) playback
  • Index(es):
    • Date
    • Thread