录制音频,添加效果,然后将结果保存到音频文件

发布于 2024-11-10 06:07:03 字数 563 浏览 2 评论 0原文

我在做标题所说的事情时遇到了困难。我的目标是能够向您的录音添加任何所需的效果,保存修改后的音频,然后将其发送到服务器。

我搜索了论坛并发现了这些线程: viewtopic.php?f=7&t=13029&p=45362&hilit= saving#p45362 viewtopic.php?f=7&t=12660&p=44586&hilit= saving#p44586 viewtopic.php?f=7&t=13178&p=45746&hilit= saving#p45746

读完这些后,我发现可以保存修改后的音频,但只能保存为 wav 吗?就像我说的,保存后它将被发送到服务器,因此大小是一个大问题,并且与其他格式相比,wav 相对较大。忽略这一事实,我尝试实现 FMOD_OUTPUTTYPE_WAVWRITER 但无法使其工作;有什么使用它的好例子吗?我查看了库中的示例,但没有看到任何内容。

但是该应用程序的基本结构是记录,关闭和打开一些开关以查看您想要的过滤器,预览它,然后按“保存”按钮“这样就可以拯救它了。这个保存功能由什么组成?

任何帮助表示赞赏,谢谢。

I am having trouble doing what the title said. My goal is to be able to add any desired effects to your recording, save the modified audio, then send that to a server.

I have searched the fourms and came across these threads:
viewtopic.php?f=7&t=13029&p=45362&hilit=saving#p45362
viewtopic.php?f=7&t=12660&p=44586&hilit=saving#p44586
viewtopic.php?f=7&t=13178&p=45746&hilit=saving#p45746

After reading those, I see it is possible to save the modified audio, but can it only be saved as a wav? Like I said after it is saved it will be sent to a server, so size is a big deal and wavs are relatively big compared to other formats. Ignoring that fact, I tried to implement FMOD_OUTPUTTYPE_WAVWRITER and I cannot get that to work; are there any good examples of using it? I looked though the examples in the library but I didn't see any..

But the basic structure of the app is to record, turn some switches off and on to see what filters you want, preview it, then press a button "Save" that will save it. What would this save function consist of?

Any help appreciated, thanks.

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

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

发布评论

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

评论(2

错爱 2024-11-17 06:07:03

使用 FMOD_OUTPUTTYPE_WAVWRITER 相当简单,您可以通过 System::setOutput 设置类型,通过 System::init extradriverdata 指定输出文件。 extradriverdata 应该是设备可写区域的绝对路径,例如文档目录。播放完毕后,调用System::release,文件就完成了。

录制带有效果的波形数据的另一个选项是创建自定义 DSP 并将其连接到播放录制数据的通道。然后,您将得到定期回调,为您提供必须自己写到磁盘的浮动数据。您可以分别在 dsp_custom 和 recordtodisk 示例中找到 DSP 和写入 wav 文件的示例。

最后请注意,FMOD 不具备将压缩音频写入磁盘的功能,您将需要另一个 API 来实现此目标。

Using FMOD_OUTPUTTYPE_WAVWRITER is fairly straight forward, you set the type via System::setOutput, specify the output file via System::init extradriverdata. The extradriverdata should be an absolute path to a writable area of the device such as the documents directory. After you have finished playing, call System::release and the file will be complete.

The other option for recording wave data with effects is by creating a custom DSP and connecting it to the channel playing the recorded data. You will then get regular callbacks giving you float data that you must write out to disk yourself. You can find examples of DSPs and writing wav files in the dsp_custom and recordtodisk examples respectively.

Finally note that FMOD doesn't come with the facility to write compressed audio to disk, you will need another API to achieve this goal.

一场春暖 2024-11-17 06:07:03

您可以通过 ExtAudioFile API 将其另存为 AAC 文件。

You can save as an AAC file via the ExtAudioFile API.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文