AudioQueue 的暂停录音回调
我对 AudioQueues 有一个基本的疑问,我正在使用 AudioQueue 进行录制,并且基本上遵循 SpeakHere 应用程序。我发现每当我在 AudioQueue 对象上使用 api: AudioQueuePause
暂停录音时,录音不会立即暂停。 AudioQueues 中是否有回调通知委托录音已暂停?
或者我对 AudioQueuePause
api 是异步的理解是错误的吗?文档中描述的 API 是:
OSStatus AudioQueuePause (
AudioQueueRef inAQ
);
它确实返回 OSStatus
,但其中哪一个表示调用成功,以及它们 (OSStatus) 是否表示调用是同步的?
谢谢, 拉吉
I have a basic doubt about AudioQueues, I am using AudioQueue to record and am basically following the SpeakHere app. I found out that whenever I pause recording using the api: AudioQueuePause
on AudioQueue object, the recording is not paused immediately. Is there a callback in AudioQueues which intimates the delegate that audio recording is paused?
Or am I wrong in understanding that AudioQueuePause
api is asynchronous? The API as depicted in the docs is:
OSStatus AudioQueuePause (
AudioQueueRef inAQ
);
It does return OSStatus
, but which one of them indicates a successful call and whether they (OSStatus) indicate that the call is synchronous?
Thanks,
Raj
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以尝试
AudioQueueGetCurrentTime 或 AudioQueueDeviceGetCurrentTime
您的 UI 发出“暂停请求”后, 。然后,您可以忽略/删除由于异步 AudioQueuePause 命令而在“暂停请求”之后录制的附加样本。
You could try
AudioQueueGetCurrentTime or AudioQueueDeviceGetCurrentTime
as soon as the "pause request" fromn your UI occurs. Then you can ignore/delete the additional samples that were recorded after your "pause request" due to the asynchronous AudioQueuePause command.