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

CoreAudio Crash


  • Subject: CoreAudio Crash
  • From: Wayne Kelso <email@hidden>
  • Date: Sat, 9 Apr 2005 14:57:38 -0400

Hello all,

I'm currently porting a slightly overweight OS9/OpenGL/OMS/QuicktimeAudio C application over into OSX/OpenGL/CoreMidi/Audio and have run into a snag.
I just need to be able to play a stereo AIFF file synched to midi while OpenGL controls the full screen.
I'm using the afplay example in the Audiofile Tools project.

If I load in an audio file and use the

<x-tad-smaller> player.Start();
</x-tad-smaller><x-tad-smaller>while</x-tad-smaller><x-tad-smaller> (</x-tad-smaller><x-tad-smaller>true</x-tad-smaller><x-tad-smaller>) {
;
</x-tad-smaller><x-tad-smaller> if (player.GetCurrentPosition() >= 1.0)
break;
usleep(250000); // 250 ms</x-tad-smaller>
<x-tad-smaller>
}
player.Stop();

</x-tad-smaller>
loop, everything works fine. If I only call
<x-tad-smaller>
player.Start();</x-tad-smaller>


and lose the loop so that I can carry on and do all the other stuff I need to do, I crash into this:

Exception: EXC_BAD_ACCESS (0x0001)
Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x000000c0

Thread 0 Crashed:
0 ....audio.toolbox.AudioToolbox 0x93b5a418 AudioFileLocker::Lock() + 0x2c
1 ....audio.toolbox.AudioToolbox 0x93b59e04 AudioFileReadPackets + 0x7c
2 CAAudioFile.ob 0x06a03624 CAAudioFile::
etc......




I did read in CoreAudio ATI about lock guards, but I have no idea how to deal with this. I also have a CFTimer() running to deal with midi iterating and OpenGL frame clamping. Past trying to link this C++ code to my C project, not sure what is going on.

Any help would be appreciated.
Thanks
Wayne




--
Kelso Productions
519.833.2800
email@hidden
http://web.stn.net/kelsoproductions
 _______________________________________________
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: The AU header problem, but a little different
  • Next by Date: Convering CoreAudio renderer to AUHAL renderer.
  • Previous by thread: SuperCollider research project
  • Next by thread: Convering CoreAudio renderer to AUHAL renderer.
  • Index(es):
    • Date
    • Thread