61
|
1 /* XMMS - Cross-platform multimedia player
|
|
2 * Copyright (C) 1998-2000 Peter Alm, Mikael Alm, Olle Hallnas, Thomas Nilsson and 4Front Technologies
|
|
3 *
|
|
4 * This program is free software; you can redistribute it and/or modify
|
|
5 * it under the terms of the GNU General Public License as published by
|
|
6 * the Free Software Foundation; either version 2 of the License, or
|
|
7 * (at your option) any later version.
|
|
8 *
|
|
9 * This program is distributed in the hope that it will be useful,
|
|
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12 * GNU General Public License for more details.
|
|
13 *
|
|
14 * You should have received a copy of the GNU General Public License
|
|
15 * along with this program; if not, write to the Free Software
|
1459
|
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
61
|
17 */
|
|
18 #ifndef WAV_H
|
|
19 #define WAV_H
|
|
20
|
|
21 #ifdef HAVE_CONFIG_H
|
|
22 # include "config.h"
|
|
23 #endif
|
|
24
|
|
25 #include <glib.h>
|
|
26
|
|
27 #include <sys/types.h>
|
|
28
|
|
29 #include <libaudacious/vfs.h>
|
|
30 #include "audacious/plugin.h"
|
|
31
|
|
32 #define WAVE_FORMAT_UNKNOWN (0x0000)
|
|
33 #define WAVE_FORMAT_PCM (0x0001)
|
|
34 #define WAVE_FORMAT_ADPCM (0x0002)
|
|
35 #define WAVE_FORMAT_ALAW (0x0006)
|
|
36 #define WAVE_FORMAT_MULAW (0x0007)
|
|
37 #define WAVE_FORMAT_OKI_ADPCM (0x0010)
|
|
38 #define WAVE_FORMAT_DIGISTD (0x0015)
|
|
39 #define WAVE_FORMAT_DIGIFIX (0x0016)
|
|
40 #define IBM_FORMAT_MULAW (0x0101)
|
|
41 #define IBM_FORMAT_ALAW (0x0102)
|
|
42 #define IBM_FORMAT_ADPCM (0x0103)
|
|
43
|
|
44 extern InputPlugin wav_ip;
|
|
45
|
|
46 typedef struct {
|
|
47 VFSFile *file;
|
|
48 short format_tag, channels, block_align, bits_per_sample, eof;
|
|
49 long samples_per_sec, avg_bytes_per_sec;
|
|
50 unsigned long position, length;
|
|
51 int seek_to, data_offset, going;
|
|
52 pid_t pid;
|
|
53 } WaveFile;
|
|
54
|
|
55 static void wav_init(void);
|
|
56 static int is_our_file(char *filename);
|
|
57 static void play_file(char *filename);
|
|
58 static void stop(void);
|
|
59 static void seek(int time);
|
|
60 static void wav_pause(short p);
|
|
61 static int get_time(void);
|
|
62 static void get_song_info(char *filename, char **title, int *length);
|
|
63
|
|
64 #endif
|