English 中文(简体)
开放式支助5.1 用于MacOS X的产出吗?
原标题:Does OpenAL support 5.1 output on Mac OS X?

在将申请从Windows到MacOS X的过程中,一米。 它正在使用“开放式”处理音响,但是,在启动MacOS X的音响发动机时,我会发现一种奇怪的行为(该代码正在MacBook Pro上运行)。

该守则是:

int InitSoundEngine(void* data[NB_BUFFERS], size_t data_size[NB_BUFFERS])
{
    ALCdevice *device;
    ALCcontext *context;
    ALenum format;
    ALuint buffers[NB_BUFFERS];

    device = alcOpenDevice(NULL);
    if (device == NULL)
        goto failed;

    context = alcCreateContext(device, NULL);
    if (context == NULL)
        goto failed;

    alcMakeContextCurrent(context);

    format = alGetEnumValue("AL_FORMAT_51CHN16");
    if (format == 0)
        goto failed;

    alGenBuffers(NB_BUFFERS, buffers);
    if (alGetError() != AL_NO_ERROR)
        goto failed;

    for (int i = 0; i < NB_BUFFERS; ++ i)
    {
        alBufferData(buffers[i], format, data[i], data_size[i], 48000);
        if (alGetError() != AL_NO_ERROR)
            goto failed;
    }

    return NO_ERROR;

 failed:
    /* Cleanup omitted for brievety */
    return INITIALIZATION_FAILED;
 }

在打电话到<代码>alBufferData时,该词即告失败,错误为AL_INVALID_VALUE<>。 在追踪该守则时,我们发现alGetEnumValue ("AL_FORMAT_51CHN16”正在退回0xfffful,我们怀疑这是问题的根源。

<代码>alGetEnumValue 说:

价值(const ALchar *enumName);

如无法找到点数,则<代码>0>,并设置<代码>。 AL_INVALID_VALUE误差状况。 附加价值的存在并不能保证扩大适用于目前情况。 非零返回仅仅表明,执行过程知道这一延长的存在。

我认为我正确利用这一职能。 是否在执行《开放式十号》方面有ug? 是否通过“开放式”支持了“九”专题研讨会的产出? 它是否通过核心音像支持(如果真的的话,向核心音像传输可能是一种选择?) 我是否应当将我的音响从5.1转换为另一种格式(3.1,定型观念,......)?

最佳回答

该表属于。 AL_EXT_MCFORMATS分机。 这份资料无法在MacOS X上查阅。

是的,核心小组可以处理5.1名(或我认为)发言者。 我不知道如何输入数据的细节。

问题回答

暂无回答




相关问题
Playing a Sound With Monotouch

No matter what I try (build -> content, NSUrl, filename) I get a null exception : file not found when I try to play a .caf sound file in monotouch. //var path = NSBundle.MainBundle.PathForResource("...

将音频Clips从Peter改为服务器

我不禁要问,那里是否有任何实例表明从Peit向服务器发送音响。 I m不关心电话或SIP风格的解决办法,只是一个简单的袖珍流程......

Play sound in iPhone web app with Javascript?

I m currently creating an iPhone web application for piano chords, and I wanted to add an option that would let the user press a Play button and play the selected chord. However, I m not sure how to ...

热门标签