- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想知道是否可以使用 iPhone SDK 播放 Ogg Vorbis 音频文件,或者是否存在允许这样做的库或框架。
我读过一些有关 OpenAL 的内容,但没有找到任何教程...谁能帮我吗?
最佳答案
迟到总比不到好;)
我在这里找到了答案Use cocos2d for playing ogg file in my project? .
PASoundMgr is a different sound engine that had support for ogg file playback. However, it hasn't been updated since iOS 2.x and there are numerous issues that have cropped up since then that it doesn't handle.
Why do you need to play ogg files? If you convert them to aac you will be able to play them back using hardware decoding which is much more efficient from a cpu usage point of view.
他们提到了 PASoundMgr。这对我有用。我刚刚从 cocos2d 框架复制了 SoundEngineTest 所基于的所有文件->库。并删除了不必要的代码。
小心 iOS 5.* 模拟器,他们有一些 problems与声音库。我的演示可以在 4.3 模拟器和设备上运行。
<小时/>以下是我创建演示的步骤:
首先您需要 cocos2d-iphone 框架。我已经有了,但你可以在这里找到它 cocos-2d_download .
正如您所注意到的,SoundEngineTest 依赖于 libvorbis.a。它是一个由 external/Tremor
组的文件组成的库。它还依赖于 OpenAl、AudioToolbox 框架。
我将 tremor 组中的所有文件复制到我的项目中。创建了“vorbis”Cocoa Touch 静态库,没有 ARC。并将所有源文件和 header 添加到构建阶段选项卡中的“vorbis”目标。
在 OggPlayDemo 的构建阶段中,将库(libvorbis、OpenAl、AudioToolbox)添加到将二进制文件与库链接框中。
向项目添加了 PA 类。并检查 OggPlayDemo 作为目标。为了避免 ARC 出现问题,我禁用了这 3 个 PA 文件的 ARC 编译。 (参见disable ARC for single file)
删除了所有 cocos2d 引用。有一些与根据方向纠正监听器位置相关的代码......我评论了它。我不需要此功能来仅播放音频。
已复制音频文件。
最后将这段代码添加到 ViewController 中:
- (void)viewDidLoad
{
[super viewDidLoad];
//init
[PASoundMgr sharedSoundManager];
[[[PASoundMgr sharedSoundManager] listener] setPosition:CGPointMake(0, 0)];
self.audioSource = [[PASoundMgr sharedSoundManager] addSound:@"trance-loop" withExtension:@"ogg" position:CGPointMake(0, 0) looped:YES];
// lower music track volume and play it
[self.audioSource setGain:0.5f];
}
- (IBAction)play:(id)sender {
[self.audioSource playAtListenerPosition];
}
关于iphone - iPhone sdk 中的 OGG Vorbis,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4745618/
我正在尝试编写一个C#程序,该程序可以读取MP4文件并以Ogg Vorbis格式转换音频,但是这里有个要点:我需要100 ms采样,以便可以对base64进行单独编码。 因此,音频从MP4文件转换为o
我正在尝试使用 Xuggler 将音频格式转换为 ogg ( vorbis ) 文件。 首先,我尝试了最基本的方法, IMediaReader readermp3 = ToolFactory.make
我正在使用 tritonous 包在 ogg-vorbis 中进行音频编码。当我提供音频格式时,我遇到了问题。 Unsupported conversion: VORBIS 44100.0Hz, u
我已经使用 android AudioRecord 录制了语音,我想将其转换为 ogg vorbis,因为它是免费的。我已经尝试过 vorbis-java beta,但它似乎不起作用或者我犯了一些错误
我想以 ogg/vorbis 格式解码一些音频流。我已经在这里找到了 MP3 和 MP2 解码的示例:http://ffmpeg.org/doxygen/trunk/decoding__encodin
我正在尝试将多个 ogg vorbis 文件连接成一个。 我知道理论上应该足够了: cat 1.ogg 2.ogg > combined.ogg 但这有缺点: 并非所有播放器都支持这样创建的文件(gs
我正在寻找 ogg vorbis header 数据包格式的规范。我在互联网上搜索过,但没有取得多大成功。我在哪里可以找到一个? 最佳答案 http://en.wikipedia.org/wiki/O
所以,这里我有一个来自我网站的演示文件 http://members.shaw.ca/darolynk/breakup/html5game/snd_music.ogg 我正在运行 Firefox Be
我想编写一个通过网络传输音频和视频的应用程序。作为一个简单的开始,我想尝试一下音频部分。 我想通过网络从我的麦克风传输 vorbis 编码的音频。我从接收器的以下管道开始: gst-launch-0.
如何使用 libvorbis 和/或 libvorbisfile 确定 Ogg Vorbis 流的长度(以秒为单位)? 据我所知,vorbis_info 中没有任何内容。告诉我流长度的结构。 最佳答案
我已经实现并正在运行 OGG vorbis 库来使用给定的库播放 .ogg 格式音频文件 here ..但问题是,它在任何时候都会给出此异常并使应用程序崩溃, -[IDZAQAudioPlayer
我在为 flv 文件加载 AVCodec 时遇到问题。 (加载mp3或者avi文件好像没有问题) 实际错误是: [vorbis @ 0x1550aa0] Extradata missing. 所以我会
我想知道 Android 设备对音频编解码器的支持是什么。 这里我发现2.3和4.0只支持mp3编解码: http://html5test.com/compare/browser/android23/
我想知道是否可以使用 iPhone SDK 播放 Ogg Vorbis 音频文件,或者是否存在允许这样做的库或框架。 我读过一些有关 OpenAL 的内容,但没有找到任何教程...谁能帮我吗? 最佳答
我正在尝试在 RemoteIO 中播放 Ogg Vorbis 文件,我使用以下代码从 vorbis 中获取 PCM 样本:我正在尝试在 RemoteIO 中播放 Ogg Vorbis 文件,我使用以下
我在学校有一个小组项目(3D FPS 游戏),我使用 C++ 中的 OpenAL 和 OGG Vorbis 对音频进行编程。我们的编译器设置为警告我们已定义但未使用的变量,结果证明这是 Vorbis
好吧,我花了一天的大部分时间来尝试这样做,我想我肯定遗漏了一些相当明显的东西。 Android SDK 显然原生支持 Vorbis 文件.有没有什么方法可以作为开发人员访问这些库。 情况:我有一个项目
我制作了一个测试应用程序以转码为 vorbis 格式(webm 容器)。 到目前为止,基于 FFmpeg 示例,一切正常,输出文件正常播放,但右声道声音丢失。我尝试寻找不同的可能性,但到目前为止找不到
我有几个视频要编码为 vp8 用于视频和 Vorbis 用于音频。这是我目前正在使用的 FFmpeg 命令: ffmpeg -y -i input.mp4 -map 0:v:0 -s 640x360
我想在 Silverlight 中从 http 播放 ogg vorbis 音频。我需要什么才能做到这一点? 最佳答案 比“Silverlight 不支持 Ogg Vorbis”更好的答案是说 Sil
我是一名优秀的程序员,十分优秀!