• 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
CoreAudio playback issue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CoreAudio playback issue


  • Subject: CoreAudio playback issue
  • From: Pascal <email@hidden>
  • Date: Mon, 8 Nov 2010 12:51:17 -0300

Hi,

I am writing a beatbox sequencer for the iphone using CoreAudio.

I have 4 sounds that play on a pattern. I have a AUGraph with IORemote and MultiChannelMixer together. The 4 inputs of the mixer have a callback reading the sound buffers attached to it. It works fine as long as long as sequencer pattern is simple and does not play too many sounds at the same time. If I turn on multiple sounds at the same time, glitches appear and it sound like the CPU is overloaded (I am using an iPhone 1st gen for testing).

I a using CAF sound files (16bits, 44.1Khz) and a canonical audio format:

    size_t bytesPerSample = sizeof (AudioUnitSampleType);

    stereoStreamFormat.mFormatID          = kAudioFormatLinearPCM;

    stereoStreamFormat.mFormatFlags       = kAudioFormatFlagsAudioUnitCanonical;

    stereoStreamFormat.mBytesPerPacket    = bytesPerSample;

    stereoStreamFormat.mFramesPerPacket   = 1;

    stereoStreamFormat.mBytesPerFrame     = bytesPerSample;

    stereoStreamFormat.mChannelsPerFrame  = 2;                    // 2 indicates stereo

    stereoStreamFormat.mBitsPerChannel    = 8 * bytesPerSample;

    stereoStreamFormat.mSampleRate        = GRAPH_SAMPLE_RATE;


Is there something I am missing or that I should know that could improve my program? Or am I hitting the CPU limitation of an iPhone 1st gen ?

Many thanks.

Pascal
 _______________________________________________
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: CoreAudio playback issue
      • From: "Development@groove4u" <email@hidden>
    • Re: CoreAudio playback issue
      • From: tahome izwah <email@hidden>
  • Prev by Date: RE: AudioQueue Services approximate latency?
  • Next by Date: Re: CoreAudio playback issue
  • Previous by thread: Re: getting to grips with coreaudio
  • Next by thread: Re: CoreAudio playback issue
  • Index(es):
    • Date
    • Thread