x*******i 发帖数: 777 | 1 Write a program for mixing soundfiles, with the following
characteristics:
写一个音频合并的程序,包括以下内容
(a) accepting any soundfile formats supported by libsndfile
输入的音频文件的格式要被libsndfile支持。
libsndfile :a crossplatform library for soundfile manipulation.
(b) taking only uncompressed PCM format, in any (integer or floating-
point)
precision (8-bit (signed/unsigned), 16-bit, 24-bit, 32-bit, floats,
doubles).
接受未经压缩过的PCM编码格式的音频,这些音频的量化精度为浮点数或者整数(每个
sample分为
1 -100 就是整数,每个sample的值只有100个可能; 每个sample 分为1.00-100.00就
是浮点
数,每个sample的值有10000个可能)
(c) accepting only matching sampling rate values (print an error message
otherwise)
只接受你指定的采样率 ,其他采样率打印错误信号。(采样率:语音编码的范畴)
(d) producing stereo files from mono and/or stereo input files; mono
files should be panned, stereo files are mixed as they are.
(e) a mix gain should be set for each soundfile
(每个文件需要设置一个混音的音量增益-语音编码的范畴)
Notes:
1. The program can optionally be made to take more than two input files
(two is
obviously the minimum). A desirable format is to take any number of
input
soundfiles.
这个程序要可以输入最少两种文件
2. The student should decide on the user input method: command-line
parameters, interactive, etc.. The minimum parameters for each input
file are: i) filename ii) gain iii) pan (for mono inputs, ignored for
stereo inputs).
有两种使用这个程序的方法,学生可以自己选择使用:命令行式(linux下面terminal
或者
windows下面的DOS);交互式的(你打开一个软件,上面写着要你输入参数,就是只接
受你指定的
采样率)。需要的参数至少要下面几项:1.文件名, 2.增益 , 3.
3. One suggestion is to use a text file user input with mix
instructions. The mixfile should contain a list of files to be mixed,
with their start times (in secs) , gain and pan positions (if mono,
ignored if stereo), accepting comments in the form of lines starting
with a hash sign (‘#’). Here’s an example of what it should look like:
# lines starting with ‘#’ are comments
# filename start-time gain pan(-1 to 1)
myfile.wav 0.25 0.9
mymono.aif 1.0 0.5 -0.5
myster.au 3.2 1.0
In the example above, we have a mixfile that will take three files of
different
formats, mix them together at the required start times with their
specific gain
values, panning the mono file halfway the centre position and the left
speaker.
Note that the first soundfile in the example only starts 0.25 secs after
the
beginning of the file, so the first 250 msecs of the output will be
silent.
4. More features/flexibility will be better. | S**I 发帖数: 15689 | 2 这是布置的作业吧?你应该独立完成而不是到这儿求助。
【在 x*******i 的大作中提到】 : Write a program for mixing soundfiles, with the following : characteristics: : 写一个音频合并的程序,包括以下内容 : (a) accepting any soundfile formats supported by libsndfile : 输入的音频文件的格式要被libsndfile支持。 : libsndfile :a crossplatform library for soundfile manipulation. : (b) taking only uncompressed PCM format, in any (integer or floating- : point) : precision (8-bit (signed/unsigned), 16-bit, 24-bit, 32-bit, floats, : doubles).
|
|