00001 /***************************************************************************** 00002 * vlc_aout_mixer.h : audio output mixer interface 00003 ***************************************************************************** 00004 * Copyright (C) 2002-2009 the VideoLAN team 00005 * $Id: 5fd2ce0953dc8814fc6e7cfa921503fb60bb917c $ 00006 * 00007 * Authors: Christophe Massiot <massiot@via.ecp.fr> 00008 * Laurent Aimar <fenrir _AT_ videolan _DOT_ org> 00009 * 00010 * This program is free software; you can redistribute it and/or modify 00011 * it under the terms of the GNU General Public License as published by 00012 * the Free Software Foundation; either version 2 of the License, or 00013 * (at your option) any later version. 00014 * 00015 * This program is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00018 * GNU General Public License for more details. 00019 * 00020 * You should have received a copy of the GNU General Public License 00021 * along with this program; if not, write to the Free Software 00022 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 00023 *****************************************************************************/ 00024 00025 #ifndef VLC_AOUT_MIXER_H 00026 #define VLC_AOUT_MIXER_H 1 00027 00028 /** 00029 * \file 00030 * This file defines functions, structures and macros for audio output mixer object 00031 */ 00032 00033 #ifdef __cplusplus 00034 extern "C" { 00035 #endif 00036 00037 //#include <vlc_aout.h> 00038 00039 /* */ 00040 typedef struct aout_mixer_sys_t aout_mixer_sys_t; 00041 typedef struct aout_mixer_t aout_mixer_t; 00042 00043 typedef struct { 00044 /* Is the input to be ignored while mixing */ 00045 bool is_invalid; 00046 00047 /* */ 00048 aout_fifo_t fifo; 00049 00050 /* Pointer on the first byte of data to mix. 00051 * 00052 * It points in the first buffer of fifo 00053 */ 00054 uint8_t *begin; 00055 00056 /* Software multiplier */ 00057 float multiplier; 00058 } aout_mixer_input_t; 00059 00060 /** 00061 * audio output mixer 00062 */ 00063 struct aout_mixer_t { 00064 VLC_COMMON_MEMBERS 00065 00066 /* Module */ 00067 module_t *module; 00068 00069 /* Mixer format. 00070 * 00071 * You cannot modify it. 00072 */ 00073 audio_sample_format_t fmt; 00074 00075 /* Mixer output buffer allocation method. 00076 * 00077 * You can override it in the open function only. 00078 */ 00079 aout_alloc_t allocation; 00080 00081 /* Multiplier used to raise or lower the volume of the sound in 00082 * software. 00083 */ 00084 float multiplier; 00085 00086 /* Array of mixer inputs */ 00087 unsigned input_count; 00088 aout_mixer_input_t **input; 00089 00090 /* Mix input into the given buffer (mandatory) */ 00091 void (*mix)(aout_mixer_t *, aout_buffer_t *); 00092 00093 /* Private place holder for the aout_mixer_t module (optional) 00094 * 00095 * A module is free to use it as it wishes. 00096 */ 00097 aout_mixer_sys_t *sys; 00098 }; 00099 00100 #ifdef __cplusplus 00101 } 00102 #endif 00103 00104 #endif
1.5.6