Documentation of the MLV-0.6.713 library

MLV_audio.h

00001 /*
00002  *   This file is part of the MLV Library.
00003  *
00004  *   Copyright (C) 2010,2011,2012 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__MLV_AUDIO_H__
00033 #define __MLV__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 
00104 void MLV_change_number_of_parallel_sounds( unsigned int n );
00105 
00120 MLV_Music* MLV_load_music( const char* file_music );
00121 
00127 void MLV_free_music( MLV_Music* music );
00128 
00137 void MLV_play_music( const MLV_Music* music, float volume, int loop );
00138 
00142 void MLV_stop_music();
00143 
00144 
00160 MLV_Sound* MLV_load_sound( const char* file_sound );
00161 
00167 void MLV_free_sound( MLV_Sound* sound );
00168 
00175 void MLV_play_sound( const MLV_Sound* sound, float volume );
00176 
00180 void MLV_stop_all_sounds();
00181 
00182 
00183 #ifdef __cplusplus
00184 }
00185 #endif
00186 
00187 #endif