encode.h
上传用户:wstnjxml
上传日期:2014-04-03
资源大小:7248k
文件大小:3k
源码类别:

Windows CE

开发平台:

C/C++

  1. /* flac - Command-line FLAC encoder/decoder
  2.  * Copyright (C) 2000,2001,2002,2003,2004,2005  Josh Coalson
  3.  *
  4.  * This program is free software; you can redistribute it and/or
  5.  * modify it under the terms of the GNU General Public License
  6.  * as published by the Free Software Foundation; either version 2
  7.  * of the License, or (at your option) any later version.
  8.  *
  9.  * This program is distributed in the hope that it will be useful,
  10.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12.  * GNU General Public License for more details.
  13.  *
  14.  * You should have received a copy of the GNU General Public License
  15.  * along with this program; if not, write to the Free Software
  16.  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  17.  */
  18. #ifndef flac__encode_h
  19. #define flac__encode_h
  20. #include "FLAC/metadata.h"
  21. #include "utils.h"
  22. #ifdef HAVE_CONFIG_H
  23. #include <config.h>
  24. #endif
  25. typedef struct {
  26. utils__SkipUntilSpecification skip_specification;
  27. utils__SkipUntilSpecification until_specification;
  28. FLAC__bool verify;
  29. #ifdef FLAC__HAS_OGG
  30. FLAC__bool use_ogg;
  31. long serial_number;
  32. #endif
  33. FLAC__bool lax;
  34. FLAC__bool do_mid_side;
  35. FLAC__bool loose_mid_side;
  36. FLAC__bool do_exhaustive_model_search;
  37. FLAC__bool do_escape_coding;
  38. FLAC__bool do_qlp_coeff_prec_search;
  39. unsigned min_residual_partition_order;
  40. unsigned max_residual_partition_order;
  41. unsigned rice_parameter_search_dist;
  42. unsigned max_lpc_order;
  43. unsigned blocksize;
  44. unsigned qlp_coeff_precision;
  45. int padding;
  46. char *requested_seek_points;
  47. int num_requested_seek_points;
  48. const char *cuesheet_filename;
  49. FLAC__bool cued_seekpoints;
  50. /* options related to --replay-gain and --sector-align */
  51. FLAC__bool is_first_file;
  52. FLAC__bool is_last_file;
  53. FLAC__int32 **align_reservoir;
  54. unsigned *align_reservoir_samples;
  55. FLAC__bool replay_gain;
  56. FLAC__bool sector_align;
  57. FLAC__StreamMetadata *vorbis_comment;
  58. struct {
  59. FLAC__bool disable_constant_subframes;
  60. FLAC__bool disable_fixed_subframes;
  61. FLAC__bool disable_verbatim_subframes;
  62. } debug;
  63. } encode_options_t;
  64. typedef struct {
  65. encode_options_t common;
  66. } wav_encode_options_t;
  67. typedef struct {
  68. encode_options_t common;
  69. FLAC__bool is_big_endian;
  70. FLAC__bool is_unsigned_samples;
  71. unsigned channels;
  72. unsigned bps;
  73. unsigned sample_rate;
  74. } raw_encode_options_t;
  75. int flac__encode_aif(FILE *infile, long infilesize, const char *infilename, const char *outfilename, const FLAC__byte *lookahead, unsigned lookahead_length, wav_encode_options_t options);
  76. int flac__encode_wav(FILE *infile, long infilesize, const char *infilename, const char *outfilename, const FLAC__byte *lookahead, unsigned lookahead_length, wav_encode_options_t options);
  77. int flac__encode_raw(FILE *infile, long infilesize, const char *infilename, const char *outfilename, const FLAC__byte *lookahead, unsigned lookahead_length, raw_encode_options_t options);
  78. #endif