当读取的音频文件,ExtAudioFile阅读,它是可以读取音频花车不连续? [英] When reading audio file with ExtAudioFile read, is it possible to read audio floats not consecutively?

查看:293
本文介绍了当读取的音频文件,ExtAudioFile阅读,它是可以读取音频花车不连续?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我真的试图绘制出波形MP3文件。

I`m trying to draw waveform out of mp3 file.

我已经成功提取使用的Core Audio SDK文档(链接中提供ExtAudioFileReadTest应用彩车: HTTP: //stephan.bernsee.com/ExtAudioFileReadTest.zip ),但它连续读取浮动。

I've succeeded to extract floats using ExtAudioFileReadTest app provided in the Core Audio SDK documentation(link: http://stephan.bernsee.com/ExtAudioFileReadTest.zip), but it reads floats consecutively.

问题是,我的音频文件很长(约1小时),所以如果我连续读取花车,它需要这么多的时间。

The problem is, that my audio file is very long (about 1 hour), so if I read floats consecutively, it takes so much time.

是否有可能跳过音频文件,然后读取小部分音频,然后跳过和阅读?

Is it possible to skip the audio file, then read small partial of audio, then skip and read?

推荐答案

是,使用ExtAudioFileSeek()寻求所需的样本框。它取决于你使用的是什么格式的一些错误(或10.6所做的那样),但MP3应该没问题。

Yes, use ExtAudioFileSeek() to seek to the desired sample frame. It has some bugs depending on what format you're using (or did on 10.6) but MP3 should be OK.

这篇关于当读取的音频文件,ExtAudioFile阅读,它是可以读取音频花车不连续?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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