00001 /* 00002 * This file is part of the MLV Library. 00003 * 00004 * Copyright (C) 2010 Adrien Boussicault, Marc Zipstein 00005 * 00006 * 00007 * This Library is free software: you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License as published by 00009 * the Free Software Foundation, either version 3 of the License, or 00010 * (at your option) any later version. 00011 * 00012 * This Library 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 Library. If not, see <http://www.gnu.org/licenses/>. 00019 */ 00020 00032 #ifndef __MLV_AUDIO_H__ 00033 #define __MLV_AUDIO_H__ 00034 00035 #ifndef MEMORY_DEBUG 00036 #include <SDL/SDL.h> 00037 #else 00038 #include "memory_debug.h" 00039 #endif 00040 00041 #ifdef __cplusplus 00042 extern "C" { 00043 #endif 00044 00048 typedef struct _MLV_Music MLV_Music; 00049 00053 typedef struct _MLV_Sound MLV_Sound; 00054 00062 int MLV_init_audio(); 00063 00067 void MLV_free_audio(); 00068 00096 int MLV_change_audio_buffer_size( int buffer_size ); 00097 00102 void MLV_change_number_of_parallel_sounds( unsigned int n ); 00103 00118 MLV_Music* MLV_load_music( const char* file_music ); 00119 00125 void MLV_free_music( MLV_Music* music ); 00126 00135 void MLV_play_music( MLV_Music* music, float volume, int loop ); 00136 00140 void MLV_stop_music(); 00141 00142 00158 MLV_Sound* MLV_load_sound( const char* file_sound ); 00159 00165 void MLV_free_sound( MLV_Sound* sound ); 00166 00173 void MLV_play_sound( MLV_Sound* sound, float volume ); 00174 00178 void MLV_stop_all_sounds(); 00179 00180 00181 #ifdef __cplusplus 00182 } 00183 #endif 00184 00185 #endif