wavs saved as wavs, pumped up version
[maemo-recorder] / src / maemo-recorder-file.h
1 /* vim: set ts=4 sw=4 et: */
2 /*
3  * maemo-recorder-file.h
4  * File-related operations
5  *
6  * Copyright (C) 2006 Nokia Corporation
7  *
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License version 2 as
11  * published by the Free Software Foundation.
12  *
13  * This program is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16  * for more details.
17  *
18  * You should have received a copy of the GNU General Public License along
19  * with this program; if not, write to the Free Software Foundation, Inc.,
20  * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21  *
22  */
23
24 #ifndef MAEMO_RECORDER_FILE_H_
25 #define MAEMO_RECORDER_FILE_H_
26
27 #include <glib.h>
28 #include <libgnomevfs/gnome-vfs.h>
29
30 #define EXTENSION_ILBC ".ilbc"
31 #define EXTENSION_RAW ".raw"
32 #define EXTENSION_PCMA ".pcma"
33 #define EXTENSION_PCMU ".pcmu"
34 #define EXTENSION_MP3 ".mp3"
35 #define EXTENSION_AU ".au"
36 #define EXTENSION_SND ".snd"
37 #define EXTENSION_WAV ".wav"
38
39 #define DEFAULT_TMP_PCMA_FILE "mrec.pcma"
40 #define DEFAULT_TMP_PCMU_FILE "mrec.pcmu"
41 #define DEFAULT_TMP_FILE "mrec.raw"
42 #define DEFAULT_TMP_WAV_FILE "mrec.wav"
43 #define DEFAULT_TMP_ILBC_FILE "mrec.ilbc"
44
45 /*
46 gboolean doSave(const gchar *tmpfile, const gchar *target, AudioFormat format);
47 */
48
49 gboolean openFile(const gchar *filename, AudioFormat *format, gchar **tmpfile);
50
51 gboolean saveFile(const gchar *filename, const gchar *tmpfile, AudioFormat format, gchar **newfile);
52
53 const gchar * getExtension(gint format);
54
55 GnomeVFSFileSize getFileLength(const gchar *file);
56
57
58 #endif
59