summaryrefslogtreecommitdiff
path: root/apps/plugins/lib/xxx2wav.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/lib/xxx2wav.h')
-rw-r--r--apps/plugins/lib/xxx2wav.h55
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 */
23typedef 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
38extern int mem_ptr;
39extern int bufsize;
40extern unsigned char* mp3buf; // The actual MP3 buffer from Rockbox
41extern unsigned char* mallocbuf; // 512K from the start of MP3 buffer
42extern unsigned char* filebuf; // The rest of the MP3 buffer
43
44void* malloc(size_t size);
45void* calloc(size_t nmemb, size_t size);
46void free(void* ptr);
47void* realloc(void* ptr, size_t size);
48void *memcpy(void *dest, const void *src, size_t n);
49void *memset(void *s, int c, size_t n);
50int memcmp(const void *s1, const void *s2, size_t n);
51void* memmove(const void *s1, const void *s2, size_t n);
52
53void display_status(file_info_struct* file_info);
54int local_init(char* infilename, char* outfilename, file_info_struct* file_info, struct plugin_api* rb);
55void close_wav(file_info_struct* file_info);