00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef LAME_LAME_H
00025 #define LAME_LAME_H
00026
00027 #include <stdio.h>
00028 #include <stdarg.h>
00029
00030 #if defined(__cplusplus)
00031 extern "C" {
00032 #endif
00033
00034 #if defined(WIN32)
00035 #undef CDECL
00036 #define CDECL _cdecl
00037 #else
00038 #define CDECL
00039 #endif
00040
00041 #define DEPRECATED_OR_OBSOLETE_CODE_REMOVED 1
00042
00043 typedef enum vbr_mode_e {
00044 vbr_off=0,
00045 vbr_mt,
00046 vbr_rh,
00047 vbr_abr,
00048 vbr_mtrh,
00049 vbr_max_indicator,
00050 vbr_default=vbr_mtrh
00051 } vbr_mode;
00052
00053
00054
00055 typedef enum MPEG_mode_e {
00056 STEREO = 0,
00057 JOINT_STEREO,
00058 DUAL_CHANNEL,
00059 MONO,
00060 NOT_SET,
00061 MAX_INDICATOR
00062 } MPEG_mode;
00063
00064
00065 typedef enum Padding_type_e {
00066 PAD_NO = 0,
00067 PAD_ALL,
00068 PAD_ADJUST,
00069 PAD_MAX_INDICATOR
00070 } Padding_type;
00071
00072
00073
00074
00075 typedef enum preset_mode_e {
00076
00077
00078 ABR_8 = 8,
00079 ABR_320 = 320,
00080
00081 V9 = 410,
00082 VBR_10 = 410,
00083 V8 = 420,
00084 VBR_20 = 420,
00085 V7 = 430,
00086 VBR_30 = 430,
00087 V6 = 440,
00088 VBR_40 = 440,
00089 V5 = 450,
00090 VBR_50 = 450,
00091 V4 = 460,
00092 VBR_60 = 460,
00093 V3 = 470,
00094 VBR_70 = 470,
00095 V2 = 480,
00096 VBR_80 = 480,
00097 V1 = 490,
00098 VBR_90 = 490,
00099 V0 = 500,
00100 VBR_100 = 500,
00101
00102
00103
00104
00105 R3MIX = 1000,
00106 STANDARD = 1001,
00107 EXTREME = 1002,
00108 INSANE = 1003,
00109 STANDARD_FAST = 1004,
00110 EXTREME_FAST = 1005,
00111 MEDIUM = 1006,
00112 MEDIUM_FAST = 1007
00113 } preset_mode;
00114
00115
00116
00117 typedef enum asm_optimizations_e {
00118 MMX = 1,
00119 AMD_3DNOW = 2,
00120 SSE = 3
00121 } asm_optimizations;
00122
00123
00124
00125 typedef enum Psy_model_e {
00126 PSY_GPSYCHO = 1,
00127 PSY_NSPSYTUNE = 2
00128 } Psy_model;
00129
00130
00131 struct lame_global_struct;
00132 typedef struct lame_global_struct lame_global_flags;
00133 typedef lame_global_flags *lame_t;
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154 lame_global_flags * CDECL lame_init(void);
00155 #if DEPRECATED_OR_OBSOLETE_CODE_REMOVED
00156 #else
00157
00158 int CDECL lame_init_old(lame_global_flags *);
00159 #endif
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170 int CDECL lame_set_num_samples(lame_global_flags *, unsigned long);
00171 unsigned long CDECL lame_get_num_samples(const lame_global_flags *);
00172
00173
00174 int CDECL lame_set_in_samplerate(lame_global_flags *, int);
00175 int CDECL lame_get_in_samplerate(const lame_global_flags *);
00176
00177
00178 int CDECL lame_set_num_channels(lame_global_flags *, int);
00179 int CDECL lame_get_num_channels(const lame_global_flags *);
00180
00181
00182
00183
00184
00185 int CDECL lame_set_scale(lame_global_flags *, float);
00186 float CDECL lame_get_scale(const lame_global_flags *);
00187
00188
00189
00190
00191
00192
00193 int CDECL lame_set_scale_left(lame_global_flags *, float);
00194 float CDECL lame_get_scale_left(const lame_global_flags *);
00195
00196
00197
00198
00199
00200
00201 int CDECL lame_set_scale_right(lame_global_flags *, float);
00202 float CDECL lame_get_scale_right(const lame_global_flags *);
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212 int CDECL lame_set_out_samplerate(lame_global_flags *, int);
00213 int CDECL lame_get_out_samplerate(const lame_global_flags *);
00214
00215
00216
00217
00218
00219
00220 int CDECL lame_set_analysis(lame_global_flags *, int);
00221 int CDECL lame_get_analysis(const lame_global_flags *);
00222
00223
00224
00225
00226
00227
00228 int CDECL lame_set_bWriteVbrTag(lame_global_flags *, int);
00229 int CDECL lame_get_bWriteVbrTag(const lame_global_flags *);
00230
00231
00232 int CDECL lame_set_decode_only(lame_global_flags *, int);
00233 int CDECL lame_get_decode_only(const lame_global_flags *);
00234
00235 #if DEPRECATED_OR_OBSOLETE_CODE_REMOVED
00236 #else
00237
00238
00239 int CDECL lame_set_ogg(lame_global_flags *, int);
00240 int CDECL lame_get_ogg(const lame_global_flags *);
00241 #endif
00242
00243
00244
00245
00246
00247
00248
00249
00250
00251 int CDECL lame_set_quality(lame_global_flags *, int);
00252 int CDECL lame_get_quality(const lame_global_flags *);
00253
00254
00255
00256
00257
00258 int CDECL lame_set_mode(lame_global_flags *, MPEG_mode);
00259 MPEG_mode CDECL lame_get_mode(const lame_global_flags *);
00260
00261 #if DEPRECATED_OR_OBSOLETE_CODE_REMOVED
00262 #else
00263
00264
00265
00266
00267
00268 int CDECL lame_set_mode_automs(lame_global_flags *, int);
00269 int CDECL lame_get_mode_automs(const lame_global_flags *);
00270 #endif
00271
00272
00273
00274
00275
00276 int CDECL lame_set_force_ms(lame_global_flags *, int);
00277 int CDECL lame_get_force_ms(const lame_global_flags *);
00278
00279
00280 int CDECL lame_set_free_format(lame_global_flags *, int);
00281 int CDECL lame_get_free_format(const lame_global_flags *);
00282
00283
00284 int CDECL lame_set_findReplayGain(lame_global_flags *, int);
00285 int CDECL lame_get_findReplayGain(const lame_global_flags *);
00286
00287
00288
00289
00290
00291 int CDECL lame_set_decode_on_the_fly(lame_global_flags *, int);
00292 int CDECL lame_get_decode_on_the_fly(const lame_global_flags *);
00293
00294 #if DEPRECATED_OR_OBSOLETE_CODE_REMOVED
00295 #else
00296
00297
00298 int CDECL lame_set_ReplayGain_input(lame_global_flags *, int);
00299 int CDECL lame_get_ReplayGain_input(const lame_global_flags *);
00300
00301
00302
00303
00304 int CDECL lame_set_ReplayGain_decode(lame_global_flags *, int);
00305 int CDECL lame_get_ReplayGain_decode(const lame_global_flags *);
00306
00307
00308
00309 int CDECL lame_set_findPeakSample(lame_global_flags *, int);
00310 int CDECL lame_get_findPeakSample(const lame_global_flags *);
00311 #endif
00312
00313
00314 int CDECL lame_set_nogap_total(lame_global_flags*, int);
00315 int CDECL lame_get_nogap_total(const lame_global_flags*);
00316
00317 int CDECL lame_set_nogap_currentindex(lame_global_flags* , int);
00318 int CDECL lame_get_nogap_currentindex(const lame_global_flags*);
00319
00320
00321
00322
00323
00324
00325
00326
00327
00328
00329
00330
00331
00332
00333
00334 int CDECL lame_set_errorf(lame_global_flags *,
00335 void (*func)(const char *, va_list));
00336 int CDECL lame_set_debugf(lame_global_flags *,
00337 void (*func)(const char *, va_list));
00338 int CDECL lame_set_msgf (lame_global_flags *,
00339 void (*func)(const char *, va_list));
00340
00341
00342
00343
00344 int CDECL lame_set_brate(lame_global_flags *, int);
00345 int CDECL lame_get_brate(const lame_global_flags *);
00346 int CDECL lame_set_compression_ratio(lame_global_flags *, float);
00347 float CDECL lame_get_compression_ratio(const lame_global_flags *);
00348
00349
00350 int CDECL lame_set_preset( lame_global_flags* gfp, int );
00351 int CDECL lame_set_asm_optimizations( lame_global_flags* gfp, int, int );
00352
00353
00354
00355
00356
00357
00358
00359 int CDECL lame_set_copyright(lame_global_flags *, int);
00360 int CDECL lame_get_copyright(const lame_global_flags *);
00361
00362
00363 int CDECL lame_set_original(lame_global_flags *, int);
00364 int CDECL lame_get_original(const lame_global_flags *);
00365
00366
00367 int CDECL lame_set_error_protection(lame_global_flags *, int);
00368 int CDECL lame_get_error_protection(const lame_global_flags *);
00369
00370
00371 int CDECL lame_set_padding_type(lame_global_flags *, Padding_type);
00372 Padding_type CDECL lame_get_padding_type(const lame_global_flags *);
00373
00374
00375 int CDECL lame_set_extension(lame_global_flags *, int);
00376 int CDECL lame_get_extension(const lame_global_flags *);
00377
00378
00379 int CDECL lame_set_strict_ISO(lame_global_flags *, int);
00380 int CDECL lame_get_strict_ISO(const lame_global_flags *);
00381
00382
00383
00384
00385
00386
00387
00388 int CDECL lame_set_disable_reservoir(lame_global_flags *, int);
00389 int CDECL lame_get_disable_reservoir(const lame_global_flags *);
00390
00391
00392 int CDECL lame_set_quant_comp(lame_global_flags *, int);
00393 int CDECL lame_get_quant_comp(const lame_global_flags *);
00394 int CDECL lame_set_quant_comp_short(lame_global_flags *, int);
00395 int CDECL lame_get_quant_comp_short(const lame_global_flags *);
00396
00397 int CDECL lame_set_experimentalX(lame_global_flags *, int);
00398 int CDECL lame_get_experimentalX(const lame_global_flags *);
00399
00400
00401 int CDECL lame_set_experimentalY(lame_global_flags *, int);
00402 int CDECL lame_get_experimentalY(const lame_global_flags *);
00403
00404
00405 int CDECL lame_set_experimentalZ(lame_global_flags *, int);
00406 int CDECL lame_get_experimentalZ(const lame_global_flags *);
00407
00408
00409 int CDECL lame_set_exp_nspsytune(lame_global_flags *, int);
00410 int CDECL lame_get_exp_nspsytune(const lame_global_flags *);
00411
00412 void CDECL lame_set_msfix(lame_global_flags *, double);
00413 float CDECL lame_get_msfix(const lame_global_flags *);
00414
00415
00416
00417
00418
00419
00420 int CDECL lame_set_VBR(lame_global_flags *, vbr_mode);
00421 vbr_mode CDECL lame_get_VBR(const lame_global_flags *);
00422
00423
00424 int CDECL lame_set_VBR_q(lame_global_flags *, int);
00425 int CDECL lame_get_VBR_q(const lame_global_flags *);
00426
00427
00428 int CDECL lame_set_VBR_mean_bitrate_kbps(lame_global_flags *, int);
00429 int CDECL lame_get_VBR_mean_bitrate_kbps(const lame_global_flags *);
00430
00431 int CDECL lame_set_VBR_min_bitrate_kbps(lame_global_flags *, int);
00432 int CDECL lame_get_VBR_min_bitrate_kbps(const lame_global_flags *);
00433
00434 int CDECL lame_set_VBR_max_bitrate_kbps(lame_global_flags *, int);
00435 int CDECL lame_get_VBR_max_bitrate_kbps(const lame_global_flags *);
00436
00437
00438
00439
00440
00441 int CDECL lame_set_VBR_hard_min(lame_global_flags *, int);
00442 int CDECL lame_get_VBR_hard_min(const lame_global_flags *);
00443
00444
00445 int CDECL lame_set_preset_expopts(lame_global_flags *, int);
00446
00447
00448
00449
00450
00451
00452 int CDECL lame_set_lowpassfreq(lame_global_flags *, int);
00453 int CDECL lame_get_lowpassfreq(const lame_global_flags *);
00454
00455 int CDECL lame_set_lowpasswidth(lame_global_flags *, int);
00456 int CDECL lame_get_lowpasswidth(const lame_global_flags *);
00457
00458
00459 int CDECL lame_set_highpassfreq(lame_global_flags *, int);
00460 int CDECL lame_get_highpassfreq(const lame_global_flags *);
00461
00462 int CDECL lame_set_highpasswidth(lame_global_flags *, int);
00463 int CDECL lame_get_highpasswidth(const lame_global_flags *);
00464
00465
00466
00467
00468
00469
00470
00471
00472 int CDECL lame_set_ATHonly(lame_global_flags *, int);
00473 int CDECL lame_get_ATHonly(const lame_global_flags *);
00474
00475
00476 int CDECL lame_set_ATHshort(lame_global_flags *, int);
00477 int CDECL lame_get_ATHshort(const lame_global_flags *);
00478
00479
00480 int CDECL lame_set_noATH(lame_global_flags *, int);
00481 int CDECL lame_get_noATH(const lame_global_flags *);
00482
00483
00484 int CDECL lame_set_ATHtype(lame_global_flags *, int);
00485 int CDECL lame_get_ATHtype(const lame_global_flags *);
00486
00487
00488 int CDECL lame_set_ATHlower(lame_global_flags *, float);
00489 float CDECL lame_get_ATHlower(const lame_global_flags *);
00490
00491
00492 int CDECL lame_set_athaa_type( lame_global_flags *, int);
00493 int CDECL lame_get_athaa_type( const lame_global_flags *);
00494
00495
00496 int CDECL lame_set_athaa_loudapprox( lame_global_flags *, int);
00497 int CDECL lame_get_athaa_loudapprox( const lame_global_flags *);
00498
00499
00500 int CDECL lame_set_athaa_sensitivity( lame_global_flags *, float);
00501 float CDECL lame_get_athaa_sensitivity( const lame_global_flags* );
00502
00503
00504 int CDECL lame_set_cwlimit(lame_global_flags *, int);
00505 int CDECL lame_get_cwlimit(const lame_global_flags *);
00506
00507
00508
00509
00510
00511 int CDECL lame_set_allow_diff_short(lame_global_flags *, int);
00512 int CDECL lame_get_allow_diff_short(const lame_global_flags *);
00513
00514
00515 int CDECL lame_set_useTemporal(lame_global_flags *, int);
00516 int CDECL lame_get_useTemporal(const lame_global_flags *);
00517
00518
00519 int CDECL lame_set_interChRatio(lame_global_flags *, float);
00520 float CDECL lame_get_interChRatio(const lame_global_flags *);
00521
00522
00523 int CDECL lame_set_no_short_blocks(lame_global_flags *, int);
00524 int CDECL lame_get_no_short_blocks(const lame_global_flags *);
00525
00526
00527 int CDECL lame_set_force_short_blocks(lame_global_flags *, int);
00528 int CDECL lame_get_force_short_blocks(const lame_global_flags *);
00529
00530
00531
00532
00533
00534 int CDECL lame_set_emphasis(lame_global_flags *, int);
00535 int CDECL lame_get_emphasis(const lame_global_flags *);
00536
00537
00538
00539
00540
00541
00542
00543
00544 int CDECL lame_get_version(const lame_global_flags *);
00545
00546
00547 int CDECL lame_get_encoder_delay(const lame_global_flags *);
00548
00549
00550
00551
00552
00553
00554
00555 int CDECL lame_get_encoder_padding(const lame_global_flags *);
00556
00557
00558 int CDECL lame_get_framesize(const lame_global_flags *);
00559
00560
00561 int CDECL lame_get_mf_samples_to_encode( const lame_global_flags* gfp );
00562
00563
00564
00565
00566
00567
00568
00569
00570 int CDECL lame_get_size_mp3buffer( const lame_global_flags* gfp );
00571
00572
00573 int CDECL lame_get_frameNum(const lame_global_flags *);
00574
00575
00576
00577
00578
00579 int CDECL lame_get_totalframes(const lame_global_flags *);
00580
00581
00582 int CDECL lame_get_RadioGain(const lame_global_flags *);
00583
00584
00585 int CDECL lame_get_AudiophileGain(const lame_global_flags *);
00586
00587
00588 float CDECL lame_get_PeakSample(const lame_global_flags *);
00589
00590
00591
00592
00593 int CDECL lame_get_noclipGainChange(const lame_global_flags *);
00594
00595
00596
00597
00598
00599 float CDECL lame_get_noclipScale(const lame_global_flags *);
00600
00601
00602
00603
00604
00605
00606
00607
00608
00609
00610
00611
00612 int CDECL lame_init_params(lame_global_flags * const );
00613
00614
00615
00616
00617
00618
00619
00620 const char* CDECL get_lame_version ( void );
00621 const char* CDECL get_lame_short_version ( void );
00622 const char* CDECL get_lame_very_short_version ( void );
00623 const char* CDECL get_psy_version ( void );
00624 const char* CDECL get_lame_url ( void );
00625
00626
00627
00628
00629
00630 typedef struct {
00631
00632 int major;
00633 int minor;
00634 int alpha;
00635 int beta;
00636
00637
00638 int psy_major;
00639 int psy_minor;
00640 int psy_alpha;
00641 int psy_beta;
00642
00643
00644 const char *features;
00645 } lame_version_t;
00646 void CDECL get_lame_version_numerical ( lame_version_t *const );
00647
00648
00649
00650
00651
00652
00653 void CDECL lame_print_config(const lame_global_flags* gfp);
00654
00655 void CDECL lame_print_internals( const lame_global_flags *gfp);
00656
00657
00658
00659
00660
00661
00662
00663
00664
00665
00666
00667
00668
00669
00670
00671
00672
00673
00674
00675
00676
00677
00678
00679
00680
00681
00682
00683
00684
00685
00686
00687
00688
00689
00690 int CDECL lame_encode_buffer (
00691 lame_global_flags* gfp,
00692 const short int buffer_l [],
00693 const short int buffer_r [],
00694 const int nsamples,
00695 unsigned char* mp3buf,
00696 const int mp3buf_size );
00697
00698
00699
00700
00701
00702
00703
00704
00705 int CDECL lame_encode_buffer_interleaved(
00706 lame_global_flags* gfp,
00707 short int pcm[],
00708
00709 int num_samples,
00710
00711
00712 unsigned char* mp3buf,
00713 int mp3buf_size );
00714
00715
00716
00717
00718
00719
00720
00721 int CDECL lame_encode_buffer_float(
00722 lame_global_flags* gfp,
00723 const float buffer_l [],
00724 const float buffer_r [],
00725 const int nsamples,
00726 unsigned char* mp3buf,
00727 const int mp3buf_size );
00728
00729
00730
00731
00732
00733
00734
00735
00736
00737
00738
00739 int CDECL lame_encode_buffer_long(
00740 lame_global_flags* gfp,
00741 const long buffer_l [],
00742 const long buffer_r [],
00743 const int nsamples,
00744 unsigned char* mp3buf,
00745 const int mp3buf_size );
00746
00747
00748
00749
00750
00751
00752
00753 int CDECL lame_encode_buffer_long2(
00754 lame_global_flags* gfp,
00755 const long buffer_l [],
00756 const long buffer_r [],
00757 const int nsamples,
00758 unsigned char* mp3buf,
00759 const int mp3buf_size );
00760
00761
00762
00763
00764
00765
00766
00767
00768
00769
00770
00771 int CDECL lame_encode_buffer_int(
00772 lame_global_flags* gfp,
00773 const int buffer_l [],
00774 const int buffer_r [],
00775 const int nsamples,
00776 unsigned char* mp3buf,
00777 const int mp3buf_size );
00778
00779
00780
00781
00782
00783
00784
00785
00786
00787
00788
00789
00790
00791
00792
00793
00794
00795
00796 int CDECL lame_encode_flush(
00797 lame_global_flags * gfp,
00798 unsigned char* mp3buf,
00799 int size);
00800
00801
00802
00803
00804
00805
00806
00807
00808
00809
00810
00811
00812
00813
00814
00815
00816
00817
00818 int CDECL lame_encode_flush_nogap(
00819 lame_global_flags * gfp,
00820 unsigned char* mp3buf,
00821 int size);
00822
00823
00824
00825
00826
00827
00828
00829
00830 int CDECL lame_init_bitstream(
00831 lame_global_flags * gfp);
00832
00833
00834
00835
00836
00837
00838
00839
00840
00841
00842
00843
00844
00845
00846
00847
00848
00849 void CDECL lame_bitrate_hist(
00850 const lame_global_flags *const gfp,
00851 int bitrate_count[14] );
00852 void CDECL lame_bitrate_kbps(
00853 const lame_global_flags *const gfp,
00854 int bitrate_kbps [14] );
00855 void CDECL lame_stereo_mode_hist(
00856 const lame_global_flags *const gfp,
00857 int stereo_mode_count[4] );
00858
00859 void CDECL lame_bitrate_stereo_mode_hist (
00860 const lame_global_flags * const gfp,
00861 int bitrate_stmode_count [14] [4] );
00862
00863 void CDECL lame_block_type_hist (
00864 const lame_global_flags * const gfp,
00865 int btype_count[6] );
00866
00867 void CDECL lame_bitrate_block_type_hist (
00868 const lame_global_flags * const gfp,
00869 int bitrate_btype_count[14][6] );
00870
00871
00872
00873
00874
00875
00876
00877
00878
00879
00880
00881
00882
00883
00884
00885
00886 void CDECL lame_mp3_tags_fid(lame_global_flags *,FILE* fid);
00887
00888
00889
00890
00891
00892
00893 int CDECL lame_close (lame_global_flags *);
00894
00895 #if DEPRECATED_OR_OBSOLETE_CODE_REMOVED
00896 #else
00897
00898
00899
00900
00901
00902
00903
00904 int CDECL lame_encode_finish(
00905 lame_global_flags* gfp,
00906 unsigned char* mp3buf,
00907 int size );
00908 #endif
00909
00910
00911
00912
00913
00914
00915
00916
00917
00918
00919
00920
00921
00922
00923 typedef struct {
00924 int header_parsed;
00925
00926 int stereo;
00927 int samplerate;
00928 int bitrate;
00929 int mode;
00930 int mode_ext;
00931 int framesize;
00932
00933
00934 unsigned long nsamp;
00935 int totalframes;
00936
00937
00938 int framenum;
00939 } mp3data_struct;
00940
00941
00942
00943
00944
00945 int CDECL lame_decode_init(void);
00946
00947
00948
00949
00950
00951
00952
00953
00954
00955
00956
00957
00958
00959
00960
00961
00962
00963
00964 int CDECL lame_decode(
00965 unsigned char * mp3buf,
00966 int len,
00967 short pcm_l[],
00968 short pcm_r[] );
00969
00970
00971 int CDECL lame_decode_headers(
00972 unsigned char* mp3buf,
00973 int len,
00974 short pcm_l[],
00975 short pcm_r[],
00976 mp3data_struct* mp3data );
00977
00978
00979 int CDECL lame_decode1(
00980 unsigned char* mp3buf,
00981 int len,
00982 short pcm_l[],
00983 short pcm_r[] );
00984
00985
00986 int CDECL lame_decode1_headers(
00987 unsigned char* mp3buf,
00988 int len,
00989 short pcm_l[],
00990 short pcm_r[],
00991 mp3data_struct* mp3data );
00992
00993
00994
00995 int CDECL lame_decode1_headersB(
00996 unsigned char* mp3buf,
00997 int len,
00998 short pcm_l[],
00999 short pcm_r[],
01000 mp3data_struct* mp3data,
01001 int *enc_delay,
01002 int *enc_padding );
01003
01004
01005
01006 int CDECL lame_decode_exit(void);
01007
01008
01009
01010
01011
01012
01013
01014
01015
01016
01017
01018
01019
01020
01021
01022
01023
01024
01025
01026
01027
01028
01029
01030
01031
01032
01033
01034
01035
01036
01037 extern void id3tag_genre_list(
01038 void (*handler)(int, const char *, void *),
01039 void* cookie);
01040
01041 extern void id3tag_init (lame_global_flags *gfp);
01042
01043
01044 extern void id3tag_add_v2 (lame_global_flags *gfp);
01045
01046
01047 extern void id3tag_v1_only (lame_global_flags *gfp);
01048
01049
01050 extern void id3tag_v2_only (lame_global_flags *gfp);
01051
01052
01053 extern void id3tag_space_v1 (lame_global_flags *gfp);
01054
01055
01056 extern void id3tag_pad_v2 (lame_global_flags *gfp);
01057
01058 extern void id3tag_set_title(
01059 lame_global_flags* gfp,
01060 const char* title );
01061 extern void id3tag_set_artist(
01062 lame_global_flags* gfp,
01063 const char* artist );
01064 extern void id3tag_set_album(
01065 lame_global_flags* gfp,
01066 const char* album );
01067 extern void id3tag_set_year(
01068 lame_global_flags* gfp,
01069 const char* year );
01070 extern void id3tag_set_comment(
01071 lame_global_flags* gfp,
01072 const char* comment );
01073
01074
01075
01076 extern int id3tag_set_track(
01077 lame_global_flags* gfp,
01078 const char* track );
01079
01080
01081
01082
01083
01084
01085 extern int id3tag_set_genre(
01086 lame_global_flags* gfp,
01087 const char* genre );
01088
01089
01090 extern int id3tag_set_fieldvalue(
01091 lame_global_flags* gfp,
01092 const char* fieldvalue);
01093
01094
01095 extern int id3tag_set_albumart(
01096 lame_global_flags* gfp,
01097 const char* image,
01098 unsigned long size );
01099
01100
01101
01102
01103
01104
01105
01106
01107 extern const int bitrate_table [3] [16];
01108 extern const int samplerate_table [3] [ 4];
01109
01110
01111
01112
01113
01114 #define LAME_MAXALBUMART (128 * 1024)
01115
01116
01117
01118
01119 #define LAME_MAXMP3BUFFER (16384 + LAME_MAXALBUMART)
01120
01121
01122 typedef enum {
01123 LAME_OKAY = 0,
01124 LAME_NOERROR = 0,
01125 LAME_GENERICERROR = -1,
01126 LAME_NOMEM = -10,
01127 LAME_BADBITRATE = -11,
01128 LAME_BADSAMPFREQ = -12,
01129 LAME_INTERNALERROR = -13,
01130
01131 FRONTEND_READERROR = -80,
01132 FRONTEND_WRITEERROR = -81,
01133 FRONTEND_FILETOOLARGE = -82
01134
01135 } lame_errorcodes_t;
01136
01137 #if defined(__cplusplus)
01138 }
01139 #endif
01140 #endif
01141