• 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: GetSourceDuration problem with mp3
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GetSourceDuration problem with mp3


  • Subject: Re: GetSourceDuration problem with mp3
  • From: William Stewart <email@hidden>
  • Date: Thu, 2 Mar 2006 11:01:20 -0800


On 02/03/2006, at 9:19 AM, Nugen wrote:

Hi,
I was using SoundConverterFillBuffer to convert a mp3 file into
PCM.

This is not advisable. You should be using AudioConveterFillComplexBuffer - for a simple to follow example of setting up and using an AudioConverter have a look at the SimpleSDK example - ConvertFile (UseACAF.cpp)... In fact, you could use this whole example to read in an MP3 file itself and seek around that file... And even in better fact!, you could just use the ExtendedAF code to do all of this work for you - it has a seek API and you can just pull samples from whereever you want in the file. This would be easiest, and there's an example of using this API in the other way of doing ConvertFile (UseExtAF.cpp)


Bill

ps - if you have to use QT for some reason, then you would be better posting to the QuickTime API list

My application needs to convert non contiguous portion of the mp3.
Because i detect a problem of glitches for some mp3 (not all) in the middle -- problems that were
not presents when i did the conversion continously -- i tried to use
the new audio extraction API (MovieAudioExtractionFillBuffer).
I set the start time using:
err = MovieAudioExtractionSetProperty(qtSound.extractionSessionRef,
kQTPropertyClass_MovieAudioExtraction_Movie,
kQTMovieAudioExtractionMoviePropertyID_CurrentTime,
sizeof(TimeRecord), &timeRec);
Problem is still here ... on same mp3 file.
While debugging i detect a problem on GetSourceDuration:
I convert a mp3 file using wavelab in wav file.
When i look the result of GetSourceDuration the values
-are identicals for mp3 or wav file if conversion gives no glitches
-are differents for the mp3 and the wav file if conversion gives some glitches...
I looked in Quicktime Player it gives me the duration (in sec.) that corresponds
to the wav files duration... not the mp3
Any idea?
I can send the mp3 file if needed,
Thanks in advance
emilie


 _______________________________________________
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

--
mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________ __
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________ __


_______________________________________________
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: 
 >GetSourceDuration problem with mp3 (From: "Nugen" <email@hidden>)

  • Prev by Date: Re: kAudioUnitProperty_SetRenderCallback disconnecting
  • Next by Date: Re: Setting a graph's sample rate
  • Previous by thread: GetSourceDuration problem with mp3
  • Next by thread: Removing MIDI channel mappings to an AU
  • Index(es):
    • Date
    • Thread