2 * sdlvf - the SDL/vorbisfile sound system
3 * Copyright (C) 2004 Vasilis Vasaitis <vvas@hal.csd.auth.gr>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 * All the possible return values of sdlvf_init() and sdlvf_check().
27 SDLVF_PLAYING, /* no error, playing file */
28 SDLVF_STOPPED, /* no error, playback has stopped */
29 SDLVF_BADFILE, /* could not open file specified */
30 SDLVF_BADOGG, /* file specified is not valid */
31 SDLVF_BADSTREAM, /* could not query current stream */
32 SDLVF_NOAUDIO /* could not open audio device */
36 * Make sure that everything works under C++ as well.
43 * Initialises the SDL/vorbisfile sound system. The audio subsystem of
44 * SDL must have been initialised before calling this function. On
45 * success, the Ogg Vorbis file specified is played, and zero
46 * (SDLVF_PLAYING) is returned. On error, the appropriate error code
49 int sdlvf_init(const char *);
52 * This function should be called regularly, i.e. multiple times per
53 * second. It makes sure that everything is going as it should. It
54 * also checks whether playback has ended, returning the appropriate
55 * value if this is the case.
57 int sdlvf_check(void);
60 * Seeks to the specified position in seconds.
62 int sdlvf_seek(double);
65 * Stops playback and shuts down the sound system.
67 void sdlvf_done(void);
70 * Returns the equivalent error string for the supplied error code.
72 char *sdlvf_strerror(int);
75 * Close the C++-supporting block if needed.
81 #endif /* !defined(_SDLVF_H) */