AudioQueueOfflineRender 返回空数据

发布于 2024-08-04 07:56:12 字数 406 浏览 3 评论 0原文

我在使用 AudioQueueOfflineRender 解码 AAC 数据时遇到问题。

当我在调用后检查缓冲区时,它总是充满空数据。我确保输入缓冲区有效并提供数据包描述。

我搜索了一下,发现其他几个也有同样的问题: http://lists.apple.com/archives/Coreaudio- api/2008/Jul/msg00119.html

另外, inTimestamp 参数对我来说没有意义。为什么渲染器应该关心音频中缓冲区的开头对应的位置?如果我传入 NULL,该函数会抛出错误,因此无论如何我都会传入时间戳。

I'm having problems using AudioQueueOfflineRender to decode AAC data.

When I examine the buffer after the call, it is always filled with empty data. I made sure the input buffer is valid and packet descriptions are provided.

I searched and found that a few others have had the same problem:
http://lists.apple.com/archives/Coreaudio-api/2008/Jul/msg00119.html

Also, the inTimestamp argument doesn't make sense to me. Why should the renderer care where in the audio the beginning of the buffer corresponds to? The function throws an error if I pass in NULL, so I pass in the timestamp anyway.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

负佳期 2024-08-11 07:56:12

您是否已通读技术问答 QA1562 和 < a href="http://developer.apple.com/iphone/library/documentation/MusicAudio/Conceptual/AudioQueueProgrammingGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40005343-CH1" rel="nofollow noreferrer" >音频队列指南?具体来说,它指出您必须在启动后立即请求 0 帧:

AudioQueueStart(myInfo.mQueue, NULL);

AudioTimeStamp theTimeStamp;
theTimeStamp.mFlags = kAudioTimeStampSampleTimeValid;
theTimeStamp.mSampleTime = 0;

/*
    Important - We need to call this once asking for 0 frames!
*/
AudioQueueOfflineRender(myInfo.mQueue, &theTimeStamp, captureBuffer, 0);

Have you read through Technical Q&A QA1562 and the Audio Queue Guide? Specifically, it states that you must ask for 0 frames immediately after start:

AudioQueueStart(myInfo.mQueue, NULL);

AudioTimeStamp theTimeStamp;
theTimeStamp.mFlags = kAudioTimeStampSampleTimeValid;
theTimeStamp.mSampleTime = 0;

/*
    Important - We need to call this once asking for 0 frames!
*/
AudioQueueOfflineRender(myInfo.mQueue, &theTimeStamp, captureBuffer, 0);
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文