资源简介
自己编译的libflac,版本1.3.2。工程中包含已编译好的dll。
代码片段和文件信息
/* example_c_decode_file - Simple FLAC file decoder using libFLAC
* Copyright (C) 2007-2009 Josh Coalson
* Copyright (C) 2011-2016 Xiph.Org Foundation
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not write to the Free Software Foundation Inc.
* 51 Franklin Street Fifth Floor Boston MA 02110-1301 USA.
*/
/*
* This example shows how to use libFLAC to decode a FLAC file to a WAVE
* file. It only supports 16-bit stereo files.
*
* Complete API documentation can be found at:
* http://xiph.org/flac/api/
*/
#ifdef HAVE_CONFIG_H
# include
#endif
#include
#include
#include “share/compat.h“
#include “FLAC/stream_decoder.h“
static FLAC__StreamDecoderWriteStatus write_callback(const FLAC__StreamDecoder *decoder const FLAC__frame *frame const FLAC__int32 * const buffer[] void *client_data);
static void metadata_callback(const FLAC__StreamDecoder *decoder const FLAC__Streammetadata *metadata void *client_data);
static void error_callback(const FLAC__StreamDecoder *decoder FLAC__StreamDecoderErrorStatus status void *client_data);
static FLAC__uint64 total_samples = 0;
static unsigned sample_rate = 0;
static unsigned channels = 0;
static unsigned bps = 0;
static FLAC__bool write_little_endian_uint16(FILE *f FLAC__uint16 x)
{
return
fputc(x f) != EOF &&
fputc(x >> 8 f) != EOF
;
}
static FLAC__bool write_little_endian_int16(FILE *f FLAC__int16 x)
{
return write_little_endian_uint16(f (FLAC__uint16)x);
}
static FLAC__bool write_little_endian_uint32(FILE *f FLAC__uint32 x)
{
return
fputc(x f) != EOF &&
fputc(x >> 8 f) != EOF &&
fputc(x >> 16 f) != EOF &&
fputc(x >> 24 f) != EOF
;
}
int main(int argc char *argv[])
{
FLAC__bool ok = true;
FLAC__StreamDecoder *decoder = 0;
FLAC__StreamDecoderInitStatus init_status;
FILE *fout;
if(argc != 3) {
fprintf(stderr “usage: %s infile.flac outfile.wav\n“ argv[0]);
return 1;
}
if((fout = fopen(argv[2] “wb“)) == NULL) {
fprintf(stderr “ERROR: opening %s for output\n“ argv[2]);
return 1;
}
if((decoder = FLAC__stream_decoder_new()) == NULL) {
fprintf(stderr “ERROR: allocating decoder\n“);
fclose(fout);
return 1;
}
(void)FLAC__stream_decoder_set_md5_checking(decoder true);
init_status = FLAC__stream_decoder_init_file(decoder argv[1] write_callback metadata_callback error_callback /*client_data=*/fout);
if(init_status != FLAC__STREAM_DECODER_INI
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
..A..H. 75776 2018-11-02 17:48 flac-1.3.2\.vs\FLAC\v14\.suo
文件 45450 2017-01-01 11:46 flac-1.3.2\aclocal.m4
文件 5826 2016-11-02 07:33 flac-1.3.2\ar-lib
文件 2155 2016-12-08 04:10 flac-1.3.2\AUTHORS
文件 1614 2016-12-08 04:10 flac-1.3.2\autogen.sh
文件 1853 2016-12-08 04:10 flac-1.3.2\build\compile.mk
文件 3969 2017-01-01 09:46 flac-1.3.2\build\config.mk
文件 3885 2016-12-08 04:10 flac-1.3.2\build\exe.mk
文件 4983 2016-12-11 17:20 flac-1.3.2\build\lib.mk
文件 949 2016-12-08 04:10 flac-1.3.2\build\Makefile.am
文件 14444 2017-01-01 11:46 flac-1.3.2\build\Makefile.in
文件 7333 2016-11-02 07:33 flac-1.3.2\compile
文件 43940 2016-11-13 04:18 flac-1.3.2\config.guess
文件 6142 2017-01-01 11:46 flac-1.3.2\config.h.in
文件 0 2017-01-01 11:46 flac-1.3.2\config.rpath
文件 36339 2016-11-13 04:18 flac-1.3.2\config.sub
文件 732849 2017-01-01 11:46 flac-1.3.2\configure
文件 17786 2017-01-01 09:46 flac-1.3.2\configure.ac
文件 20403 2016-12-04 18:05 flac-1.3.2\COPYING.FDL
文件 18092 2016-12-04 18:05 flac-1.3.2\COPYING.GPL
文件 26436 2016-12-04 18:05 flac-1.3.2\COPYING.LGPL
文件 1509 2016-12-08 04:10 flac-1.3.2\COPYING.Xiph
文件 23566 2016-11-02 07:33 flac-1.3.2\depcomp
文件 49840 2017-01-01 09:46 flac-1.3.2\doc\Doxyfile.in
文件 918 2016-12-08 04:10 flac-1.3.2\doc\doxygen.footer.html
文件 450 2016-12-08 04:10 flac-1.3.2\doc\doxygen.header.html
文件 0 2017-01-01 11:47 flac-1.3.2\doc\FLAC.tag
文件 82369 2017-01-01 09:46 flac-1.3.2\doc\html\changelog.html
文件 5874 2016-12-08 04:10 flac-1.3.2\doc\html\developers.html
文件 5049 2016-12-08 04:10 flac-1.3.2\doc\html\documentation.html
............此处省略1678个文件信息
- 上一篇:micro cap9 安装包,破解即可用
- 下一篇:xshell6.7z
评论
共有 条评论