使用Core Audio可以安全地忽略__cxa_throw吗? [英] is __cxa_throw safe to ignore with Core Audio?

查看:234
本文介绍了使用Core Audio可以安全地忽略__cxa_throw吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

类似的问题已被问到..但我想让它更具体到核心音频..因为我们中的一些人可能已经注意到核心音频有很少的空间错误。

A similar question 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.

由于上述问题的回答解释了,__cxa_throw是一个C ++ 未处理的异常,可以忽略(Xcode的这个问题似乎是新的4.5.1 ..我从来没有看过它)

As the answer to the said question explains, __cxa_throw is a C++ unhandled exception, which can be ignored (this problem seems to be new with Xcode 4.5.1.. I've never seen it before as well)

我们可以说同样的核心音频吗?什么让我紧张的是它与音频的格式化有关...我的代码很多依赖于:

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:

我正在尝试转换一个AAC文件

I'm trying to convert an AAC file unto lPCM..

输出格式:

// set up the PCM output format for conversion
streamer->PCMoutputFormat.mSampleRate = 44100.0;
streamer->PCMoutputFormat.mFormatID = kAudioFormatLinearPCM;
streamer->PCMoutputFormat.mFormatFlags = kAudioFormatFlagsCanonical;
streamer->PCMoutputFormat.mBytesPerPacket = 4;
streamer->PCMoutputFormat.mFramesPerPacket = 1;
streamer->PCMoutputFormat.mBytesPerFrame = 4;
streamer->PCMoutputFormat.mChannelsPerFrame = 2;
streamer->PCMoutputFormat.mBitsPerChannel = 16;

输入格式:

mSampleRate = 44100
mFormatID = 1633772320 (AAC)
mFormatFlags = 0
mBytesPerPacket = 0 
mFramesPerPacket = 1024
mBytesPerFrame = 0
mChannelsPerFrame = 2
mBitsPerChannel = 0

实例变量:

game.h

@interface Game : NSObject <GKSessionDelegate>
{
    AudioStreamer *streamer;
}

@property (nonatomic, assign) AudioStreamBasicDescription mediaItemInputFormat;

audioStreamer.h

audioStreamer.h

@interface AudioStreamer : NSObject
{
    @public
        AudioStreamBasicDescription PCMoutputFormat;
        AudioConverterRef audioConverter;
}

在game.m中设置转换器命令这是__cxa_throw未处理的异常抛出的地方!)

setting up converter command in game.m (this is where the __cxa_throw unhandled exception is thrown!)

// set up converter
OSStatus result = AudioConverterNew(&_mediaItemInputFormat,
                                    &streamer->PCMoutputFormat,
                                    &streamer->audioConverter);


推荐答案

如果异常没有终止应用程序那么其他一些代码处理它。如果你信任任何代码,那么就没有什么可担心的。

If the exception didn't end up terminating the application then some other piece of code handled it. If you trust whatever piece of code that was then there's nothing to worry about.

这篇关于使用Core Audio可以安全地忽略__cxa_throw吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆