Back to index

extremetuxracer  0.5beta
audio_data.h
Go to the documentation of this file.
00001 /* 
00002  * PPRacer 
00003  * Copyright (C) 2004-2005 Volker Stroebel <volker@planetpenguin.de>
00004  *
00005  * Copyright (C) 1999-2001 Jasmin F. Patry
00006  * 
00007  * This program is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU General Public License
00009  * as published by the Free Software Foundation; either version 2
00010  * of the License, or (at your option) any later version.
00011  * 
00012  * This program is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  * 
00017  * You should have received a copy of the GNU General Public License
00018  * along with this program; if not, write to the Free Software
00019  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00020  */
00021 
00022 #ifndef AUDIO_DATA_H
00023 #define AUDIO_DATA_H
00024 
00025 #include "../../etracer.h"
00026 
00027 #if defined(HAVE_SDL_MIXER)
00028    
00029 #include "SDL.h"
00030 #include "SDL_mixer.h"
00031 
00032 #else
00033 
00034 typedef int Mix_Chunk;
00035 typedef int Mix_Music;
00036 
00037 #endif /* defined(HAVE_SDL) && defined(HAVE_SDL_MIXER) */
00038 
00039 void init_audio_data();
00040 
00041 /* SOUND */
00042 bool load_sound( const char *name, const char *filename ) ;
00043 bool get_sound_data( char *name, Mix_Chunk **data );
00044 void incr_sound_data_ref_ctr( const char *name ) ;
00045 void decr_sound_data_ref_ctr( const char *name ) ;
00046 void delete_unused_audio_data();
00047 bool is_sound_data_dirty();
00048 void mark_sound_data_clean();
00049 void register_sound_data_tcl_callbacks( Tcl_Interp *ip );
00050 
00051 /* MUSIC */
00052 bool load_music( const char *name, const char *filename ) ;
00053 bool get_music_data( char *name, Mix_Music **data );
00054 void set_music_playing_status( char *name, bool playing );
00055 bool get_music_playing_status( char *name );
00056 void incr_music_data_ref_ctr( const char *name ) ;
00057 void decr_music_data_ref_ctr( const char *name ) ;
00058 bool is_music_data_dirty();
00059 void mark_music_data_clean();
00060 
00061 #endif /* AUDIO_DATA_H */