• 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
Help! Setting the "play head" position within an MP3 song?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help! Setting the "play head" position within an MP3 song?


  • Subject: Help! Setting the "play head" position within an MP3 song?
  • From: "David M.Cotter" <email@hidden>
  • Date: Sun, 2 Jan 2005 13:21:35 -0800

i'm using PlayAudioFileLite sample.

I want to adjust the position of the "play head" a-la iTunes.

I figured all I had to do was:

LERP() is just a "Linear Interpolate", i know that function works
progF = { some value between zero and one, indicating percentage of total song }


i_audioPlayer->i_packetOffset = LERP(0, i_audioPlayer->i_totalPacketCount, progF, 0.0, 1.0);
i_audioPlayer->i_byteOffset = i_audioPlayer->i_packetOffset * i_audioPlayer->i_maxPacketSize;


but when I do that, then next time thru:

    err = AudioConverterFillComplexBuffer(
    	i_convert_in_2_effect, CB_S_MP3_Decompress_InputProc,
    	inInputDataProcUserData, &inNumFrames,
    	ioData, outPacketDescription);

I get err = -50.  that's a paramErr right?  why??

-dave

_______________________________________________
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: AudioFileTools (From: Ruben Perez <email@hidden>)

  • Prev by Date: Re: AudioFileTools
  • Next by Date: Help: Sample accurate playhead positioning?
  • Previous by thread: Re: AudioFileTools
  • Next by thread: Help: Sample accurate playhead positioning?
  • Index(es):
    • Date
    • Thread