• 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: odd soundfile buffer problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: odd soundfile buffer problem


  • Subject: Re: odd soundfile buffer problem
  • From: Eric Allamanche <email@hidden>
  • Date: Fri, 21 May 2010 09:15:02 -0700

On May 20, 2010, at 10:00 PM, Brad Garton wrote:

> Hey Coreaudioers --
>
> I'm having a strange iPhoneOS problem, I'll post it here to see if anyone has any clues.  I load a soundfile into a buffer:
>
> 	status = AudioFileReadPackets (soundFile, false, &numBytes, NULL, 0, &numPackets, sampBuf);
> 	if (status !=0) {
> 		NSLog(@"problem reading file packets into buffer");
> 		return -1;
> 	}
>
> and in the simulator it works fine and dandy to access and play the buffer.  However, when I compile and load into my iPhone device, I hear nothing... no errors reported though.
>
> Now, if I add this line after the above code:
>
> 		NSLog(@"numPackets read into sampBuf: %d", numPackets);
>
> it then works fine on my device!  Nothing else is changed in the code.  Is this at all familiar to anyone?

when adding printf like statements make things work magically, then this hints at some heap/stack corruption issues. Have you checked that your buffers are large enough? Try enabling Guard Malloc and see what happens.

Eric

>
> brad
>
> _______________________________________________
> 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

 _______________________________________________
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: odd soundfile buffer problem
      • From: Brad Garton <email@hidden>
References: 
 >odd soundfile buffer problem (From: Brad Garton <email@hidden>)

  • Prev by Date: Re: USB audio class - kIOAudioControlUsagePassThru implementation
  • Next by Date: Referencing an AUGraph from a different class
  • Previous by thread: Re: odd soundfile buffer problem
  • Next by thread: Re: odd soundfile buffer problem
  • Index(es):
    • Date
    • Thread