• 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
[iOS] Audio samples playing double time
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[iOS] Audio samples playing double time


  • Subject: [iOS] Audio samples playing double time
  • From: Development <email@hidden>
  • Date: Tue, 7 Dec 2010 16:05:53 -0700

This morning I sat down and built my app. I ran it and suddenly, having not changed anything in the app, it has decided to play all my tracks at 2x+ speed and I cannot figure out how this could be possible.
All the files are 44.1, stereo m4a files
I have absolutely no clue how to change this especially since it was working correctly last night before I went to be and I didn't change anything

this is the code that sets up the particular track when it is loaded from disc

mUserData.soundBuffer[i].asbd.mSampleRate = fileFormat.mSampleRate;
mUserData.soundBuffer[i].asbd.mChannelsPerFrame = fileFormat.mChannelsPerFrame;
NSLog(@"Sample rate: %f channels %i",mUserData.soundBuffer[i].asbd.mSampleRate,mUserData.soundBuffer[i].asbd.mChannelsPerFrame);
        mUserData.soundBuffer[i].numFrames = numFrames;
        mUserData.soundBuffer[i].asbd = mClientFormat;
mUserData.soundBuffer[i].loop = NO;
mUserData.soundBuffer[i].asbd.mFormatID = kAudioFormatLinearPCM;
mUserData.soundBuffer[i].asbd.mBytesPerPacket = 2 * mUserData.soundBuffer[i].asbd.mChannelsPerFrame;
mUserData.soundBuffer[i].asbd.mFramesPerPacket = 1;
//mUserData.soundBuffer[i].asbd.mBytesPerFrame = 2 * mUserData.soundBuffer[i].asbd.mChannelsPerFrame;
mUserData.soundBuffer[i].asbd.mBitsPerChannel =16;
mUserData.soundBuffer[i].asbd.mBytesPerFrame = ( mUserData.soundBuffer[i].asbd.mBitsPerChannel / 16) * mUserData.soundBuffer[i].asbd.mChannelsPerFrame;
 _______________________________________________
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

  • Prev by Date: Re: Cannot see audio device
  • Next by Date: AirPlay for 3rd Party Mac apps?
  • Previous by thread: Re: OpenAL: how to determine maximum available Sources
  • Next by thread: AirPlay for 3rd Party Mac apps?
  • Index(es):
    • Date
    • Thread