]> 4ch.mooo.com Git - 16.git/blob - src/lib/dl/ext/lame/get_audio.h
cleaned up the repo from debugging watcom2 ^^
[16.git] / src / lib / dl / ext / lame / get_audio.h
1 /*
2  *    Get Audio routines include file
3  *
4  *    Copyright (c) 1999 Albert L Faber
5  *                  2010 Robert Hegemann
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Library General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Library General Public License for more details.
16  *
17  * You should have received a copy of the GNU Library General Public
18  * License along with this library; if not, write to the
19  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20  * Boston, MA 02111-1307, USA.
21  */
22
23
24 #ifndef LAME_GET_AUDIO_H
25 #define LAME_GET_AUDIO_H
26 #include "lame.h"
27 #include <stdio.h>
28
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32
33 typedef enum sound_file_format_e {
34     sf_unknown,
35     sf_raw,
36     sf_wave,
37     sf_aiff,
38     sf_mp1,                  /* MPEG Layer 1, aka mpg */
39     sf_mp2,                  /* MPEG Layer 2 */
40     sf_mp3,                  /* MPEG Layer 3 */
41     sf_mp123,                /* MPEG Layer 1,2 or 3; whatever .mp3, .mp2, .mp1 or .mpg contains */
42     sf_ogg
43 } sound_file_format;
44
45 int     is_mpeg_file_format( int input_format );
46
47 int     init_infile(lame_t gfp, char const * inPath);
48 int     samples_to_skip_at_start(void);
49 int     samples_to_skip_at_end(void);
50 void    close_infile(void);
51 int     get_audio(lame_t gfp, int buffer[2][1152]);
52 int     get_audio16(lame_t gfp, short buffer[2][1152]);
53 int     get_audio_float(lame_t gfp, float buffer[2][1152]);
54 int     get_audio_double(lame_t gfp, double buffer[2][1152]);
55 hip_t   get_hip(void);
56
57 FILE   *init_outfile(char const *outPath, int decode);
58 int     WriteWaveHeader(FILE * const fp, int pcmbytes, int freq, int channels, int bits);
59 void    put_audio16(FILE* outf, short Buffer[2][1152], int iread, int nch);
60
61 /*
62 struct AudioReader;
63 typedef struct AudioReader* AudioReader;
64
65 AudioReader ar_open(lame_t gfp, char const* inPath);
66 int     ar_samplesToSkipAtStart(AudioReader ar);
67 int     ar_samplesToSkipAtEnd(AudioReader ar);
68 void    ar_close(AudioReader ar);
69 int     ar_readInt(AudioReader ar, lame_t gfp, int buffer[2][1152]);
70 int     ar_readShort(AudioReader ar, lame_t gfp, short buffer[2][1152]);
71 int     ar_readFloat(AudioReader ar, lame_t gfp, float buffer[2][1152]);
72
73 struct AudioWriter;
74 typedef struct AudioWriter* AudioWriter;
75
76 AudioWriter aw_open(lame_t gfp, char const* outPath, int pcmbystes, int freq, int channels, int bits);
77 int     aw_writeWaveHeader(AudioWriter aw);
78 int     aw_write(AudioWriter aw, short buffer[2][1152], int n);
79 int     aw_write(AudioWriter aw, float buffer[2][1152], int n);
80
81 */
82
83 extern size_t sizeOfOldTag(lame_t gf);
84 extern unsigned char* getOldTag(lame_t gf);
85
86 #ifdef _cplusplus
87 }
88 #endif
89
90 #endif /* ifndef LAME_GET_AUDIO_H */