This is an audio resamplerate program for Linux,support PCM and WAV audio(mone or stereo),bits of each sample is 16 default.
- log : print verbose/info/debug/warning/error message.
- iniparser : configure the parameters by
config.ini
dynamically. - resamplerate : resamplerate your parogram.
$ git clone [email protected]:AnSwErYWJ/AudioResamplerate.git
-
If you modify the file of three components, compile three dynamic library of components :
$ make iniparser $ make resamplerate
-
If you modify the
source/resamplerate.c
include/resamplerate
, compile bin :$ make
-
Modify the
config.ini
to configure the parameters, input support PCM or WAV audio files, and output only support PCM audio files, such as :[audio] channels = 1; input_sample_rate = 16000; output_sample_rate = 48000; [path] input = ./audio/S16bit-LE-16kHz-Mono.pcm; output = ./audio/out.pcm; [type] input = wav; output = null;
-
Then,run the program with :
$ export LD_LIBRARY_PATH=./lib:$LD_LIBRARY_PATH $ ./resamplerate
- Linux
- POSIX C
- Bash Shell
- Use TOML replace iniparser.
- WebSite:http://www.answerywj.com
- Email:[email protected]
- GitHub:AnSwErYWJ
- Blog:AnSwEr不是答案的专栏
- Weibo:@AnSwEr不是答案
BSD 2-Clause License
Copyright (c) 2016-2018, AnSwErYWJ(Weijie Yuan),[email protected] All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.