使用FMOD将输出保存到磁盘 [英] Save output to disk using FMOD
问题描述
我使用FMOD播放一些声音,我想把结果保存到磁盘。
I am using FMOD to play some sounds and I would like to save the resulting mix to the disk.
我一直在尝试system-> recordStart ,sound,true)路径,但保存设备的麦克风输入。
I have been trying the system->recordStart(0, sound, true) path, but that saves the microphone input of the device.
在某些方面,我想将扬声器输出重定向到磁盘。
In some way, I would like to redirect the speakers output to the disk
谢谢
Marc
推荐答案
使用函数System :: setOutput并传入值FMOD_OUTPUTTYPE_WAVWRITER。确保在调用System :: init之前调用此函数,当完成时调用System :: release,并且可执行文件旁边将显示一个wav文件。
To redirect everything that would go to the speakers to disk simply use the function System::setOutput and pass in a value of FMOD_OUTPUTTYPE_WAVWRITER. Make sure you call this function before you call System::init, when you are done call System::release and a wav file will appear next to your executable.
也可以通过传递一个完整路径通过System :: init extradriverdata参数指定输出wav文件的名称和位置。
You can also specify the name and location of the output wav file by passing a full path via the System::init extradriverdata parameter.
这篇关于使用FMOD将输出保存到磁盘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!