diff options
Diffstat (limited to 'apps/plugins/lib/xxx2wav.h')
-rw-r--r-- | apps/plugins/lib/xxx2wav.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/apps/plugins/lib/xxx2wav.h b/apps/plugins/lib/xxx2wav.h new file mode 100644 index 0000000000..27e293f797 --- /dev/null +++ b/apps/plugins/lib/xxx2wav.h | |||
@@ -0,0 +1,55 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2005 Dave Chapman | ||
11 | * | ||
12 | * All files in this archive are subject to the GNU General Public License. | ||
13 | * See the file COPYING in the source tree root for full license agreement. | ||
14 | * | ||
15 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
16 | * KIND, either express or implied. | ||
17 | * | ||
18 | ****************************************************************************/ | ||
19 | |||
20 | /* Various "helper functions" common to all the xxx2wav decoder plugins */ | ||
21 | |||
22 | /* the main data structure of the program */ | ||
23 | typedef struct { | ||
24 | int infile; | ||
25 | int outfile; | ||
26 | off_t curpos; | ||
27 | off_t filesize; | ||
28 | int samplerate; | ||
29 | int channels; | ||
30 | int frames_decoded; | ||
31 | unsigned long total_samples; | ||
32 | unsigned long current_sample; | ||
33 | unsigned long start_tick; | ||
34 | } file_info_struct; | ||
35 | |||
36 | #define MALLOC_BUFSIZE (512*1024) | ||
37 | |||
38 | extern int mem_ptr; | ||
39 | extern int bufsize; | ||
40 | extern unsigned char* mp3buf; // The actual MP3 buffer from Rockbox | ||
41 | extern unsigned char* mallocbuf; // 512K from the start of MP3 buffer | ||
42 | extern unsigned char* filebuf; // The rest of the MP3 buffer | ||
43 | |||
44 | void* malloc(size_t size); | ||
45 | void* calloc(size_t nmemb, size_t size); | ||
46 | void free(void* ptr); | ||
47 | void* realloc(void* ptr, size_t size); | ||
48 | void *memcpy(void *dest, const void *src, size_t n); | ||
49 | void *memset(void *s, int c, size_t n); | ||
50 | int memcmp(const void *s1, const void *s2, size_t n); | ||
51 | void* memmove(const void *s1, const void *s2, size_t n); | ||
52 | |||
53 | void display_status(file_info_struct* file_info); | ||
54 | int local_init(char* infilename, char* outfilename, file_info_struct* file_info, struct plugin_api* rb); | ||
55 | void close_wav(file_info_struct* file_info); | ||