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

Re: CoreAudio playback issue


  • Subject: Re: CoreAudio playback issue
  • From: "Development@groove4u" <email@hidden>
  • Date: Mon, 8 Nov 2010 18:36:05 +0100

I think the other advise is right on the money. I did run into similar things in the past, and just some simple calls to NSLog() already slowed the framegeneration enough to be a problem.  I just tested the code I am using on a 1st gen iPhone, running 3.1.3, and i can at least create 9 busses for the mulitchannel mixer. 

Frank
On Nov 8, 2010, at 4:51 PM, Pascal wrote:

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
References: 
 >CoreAudio playback issue (From: Pascal <email@hidden>)

  • Prev by Date: Issue with Logic 64bits bridge and cocoa UI
  • Next by Date: Fwd: CoreAudio playback issue
  • Previous by thread: Re: CoreAudio playback issue
  • Next by thread: Fwd: CoreAudio playback issue
  • Index(es):
    • Date
    • Thread