aflibAudioMixer.h

00001 /*
00002  * Copyright: (C) 2000-2001 Bruce W. Forsberg
00003  *
00004  *   This library is free software; you can redistribute it and/or
00005  *   modify it under the terms of the GNU Lesser General Public
00006  *   License as published by the Free Software Foundation; either
00007  *   version 2.1 of the License, or any later version.
00008  *
00009  *   This library is distributed in the hope that it will be useful,
00010  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  *   Lesser General Public License for more details.
00013  *
00014  *   You should have received a copy of the GNU Lesser General Public
00015  *   License along with this library; if not, write to the Free Software
00016  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
00017  *
00018  *   Bruce Forsberg  forsberg@tns.net
00019  *
00020  */
00021 
00022 
00023 #ifndef _AFLIBAUDIOMIXER_H_
00024 #define _AFLIBAUDIOMIXER_H_
00025 
00026 #ifdef HAVE_CONFIG_H
00027 #include <config.h>
00028 #endif
00029 
00030 #include "aflibAudio.h"
00031 #include "aflibMixerItem.h"
00032 #include <set>
00033 using std::set;
00034 
00057 class aflibAudioMixer : public aflibAudio {
00058 
00059 public:
00060 
00061    // Available contructors and destructors
00062    aflibAudioMixer(
00063       aflibAudio& audio);
00064 
00065    aflibAudioMixer();
00066 
00067    ~aflibAudioMixer();
00068 
00069    aflibStatus
00070    addMix(
00071       int  input,
00072       int  in_chan,
00073       int  out_chan,
00074       int  amp);
00075 
00076    aflibStatus
00077    delMix(
00078       int  input,
00079       int  in_chan,
00080       int  out_chan);
00081 
00082    void
00083    delAllMix();
00084 
00085    int
00086    getNumOfMixs();
00087 
00088    aflibStatus
00089    getMix(
00090       int   mix_num,
00091       int&  input,
00092       int&  in_chan,
00093       int&  out_chan,
00094       int&  amp);
00095 
00096    void
00097    setInputConfig(const aflibConfig& cfg);
00098 
00099    aflibStatus
00100    compute_segment(
00101       list<aflibData *>& data,
00102       long long position = -1) ;
00103 
00105    const char *
00106    getName() const { return "aflibAudioMixer";};
00107 
00108    bool
00109    isDataSizeSupported(aflib_data_size size);
00110  
00111    bool
00112    isEndianSupported(aflib_data_endian end);
00113  
00114    bool
00115    isSampleRateSupported(int& rate);
00116 
00117 
00118 private:
00119 
00120    aflibAudioMixer(const aflibAudioMixer& op);
00121 
00122    const aflibAudioMixer&
00123    operator=(const aflibAudioMixer& op);
00124 
00125    void
00126    parentWasDestroyed(int parent_id);
00127  
00128 
00129 set < aflibMixerItem, less<aflibMixerItem> > _mix_item;
00130 
00131 };
00132 
00133 #endif

Generated on Tue Jan 16 12:42:55 2007 for Open Source Audio Library Project by  doxygen 1.4.6