Note that there are some explanatory texts on larger screens.

plurals
  1. POis __cxa_throw safe to ignore with Core Audio?
    text
    copied!<p>A similar <a href="https://stackoverflow.com/questions/12861748/how-do-i-know-when-safe-to-ignore-cxa-throw-on-an-all-exceptions-breakpoint">question</a> has been asked.. but I wanted to make it more specific to core audio.. as some of us may have noticed core audio has very little room for error.</p> <p>As the <a href="https://stackoverflow.com/a/12861939/766570">answer</a> to the said question explains, __cxa_throw is a C++ <a href="http://www.cocoabuilder.com/archive/xcode/272954-exception-breakpoint-failure.html" rel="nofollow noreferrer">unhandled exception</a>, which can be ignored (this problem seems to be new with Xcode 4.5.1.. I've never seen it before as well)</p> <p>can we say the same about core audio? What makes me nervous is that it has to do with formatting of the audio.. which a lot of my code depends on:</p> <p>I'm trying to convert an AAC file unto lPCM.. </p> <p><b>output format:</b></p> <pre><code>// set up the PCM output format for conversion streamer-&gt;PCMoutputFormat.mSampleRate = 44100.0; streamer-&gt;PCMoutputFormat.mFormatID = kAudioFormatLinearPCM; streamer-&gt;PCMoutputFormat.mFormatFlags = kAudioFormatFlagsCanonical; streamer-&gt;PCMoutputFormat.mBytesPerPacket = 4; streamer-&gt;PCMoutputFormat.mFramesPerPacket = 1; streamer-&gt;PCMoutputFormat.mBytesPerFrame = 4; streamer-&gt;PCMoutputFormat.mChannelsPerFrame = 2; streamer-&gt;PCMoutputFormat.mBitsPerChannel = 16; </code></pre> <p><b>input format:</b></p> <pre><code>mSampleRate = 44100 mFormatID = 1633772320 (AAC) mFormatFlags = 0 mBytesPerPacket = 0 mFramesPerPacket = 1024 mBytesPerFrame = 0 mChannelsPerFrame = 2 mBitsPerChannel = 0 </code></pre> <p><b>instance variables:</b></p> <p>game.h</p> <pre><code>@interface Game : NSObject &lt;GKSessionDelegate&gt; { AudioStreamer *streamer; } @property (nonatomic, assign) AudioStreamBasicDescription mediaItemInputFormat; </code></pre> <p>audioStreamer.h</p> <pre><code>@interface AudioStreamer : NSObject { @public AudioStreamBasicDescription PCMoutputFormat; AudioConverterRef audioConverter; } </code></pre> <p><b>setting up converter command in game.m</b> (this is where the __cxa_throw unhandled exception is thrown!)</p> <pre><code>// set up converter OSStatus result = AudioConverterNew(&amp;_mediaItemInputFormat, &amp;streamer-&gt;PCMoutputFormat, &amp;streamer-&gt;audioConverter); </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload