Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

sonix.h

Go to the documentation of this file.
00001 /****************** <SNX heading BEGIN do not edit this line> *****************
00002  *
00003  * sonix
00004  *
00005  * Original Authors:
00006  *   Kevin Meinert, Carolina Cruz-Neira
00007  *
00008  * -----------------------------------------------------------------
00009  * File:          $RCSfile: sonix.h,v $
00010  * Date modified: $Date: 2003/06/07 21:20:48 $
00011  * Version:       $Revision: 1.19 $
00012  * -----------------------------------------------------------------
00013  *
00014  ****************** <SNX heading END do not edit this line> ******************/
00015 
00016 /*************** <auto-copyright.pl BEGIN do not edit this line> **************
00017  *
00018  * VR Juggler is (C) Copyright 1998-2003 by Iowa State University
00019  *
00020  * Original Authors:
00021  *   Allen Bierbaum, Christopher Just,
00022  *   Patrick Hartling, Kevin Meinert,
00023  *   Carolina Cruz-Neira, Albert Baker
00024  *
00025  * This library is free software; you can redistribute it and/or
00026  * modify it under the terms of the GNU Library General Public
00027  * License as published by the Free Software Foundation; either
00028  * version 2 of the License, or (at your option) any later version.
00029  *
00030  * This library is distributed in the hope that it will be useful,
00031  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00032  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00033  * Library General Public License for more details.
00034  *
00035  * You should have received a copy of the GNU Library General Public
00036  * License along with this library; if not, write to the
00037  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00038  * Boston, MA 02111-1307, USA.
00039  *
00040  *************** <auto-copyright.pl END do not edit this line> ***************/
00041 
00042 /* Generated by Together */
00043 
00044 #ifndef SONIX___H
00045 #define SONIX___H
00046 
00047 #include <snx/snxConfig.h>
00048 
00049 #include <stdlib.h>
00050 #include <string>
00051 #include <gmtl/Matrix.h>
00052 #include <vpr/Util/Singleton.h>
00053 
00054 #include "snx/SoundInfo.h"
00055 #include "snx/SoundImplementation.h"
00056 #include "snx/SoundAPIInfo.h"
00057 
00058 class SNX_CLASS_API sonix
00059 {
00060 protected:
00061    //: default constructor
00062    sonix() : mImplementation( NULL )
00063    {
00064    }
00065 
00066    //: virtual destructor
00067    virtual ~sonix();
00068 
00069 public:
00070 
00078    virtual void trigger( const std::string& alias, const int& repeat = 1 );
00079    
00083    virtual bool isPlaying( const std::string& alias );
00084 
00085    /*
00086     * when sound is already playing then you call trigger,
00087     * does the sound restart from beginning?
00088     */
00089    virtual void setRetriggerable( const std::string& alias, bool onOff );
00090 
00094    virtual bool isRetriggerable( const std::string& alias );
00095 
00100    virtual void stop( const std::string& alias );
00101 
00105    virtual void pause( const std::string& alias );
00106 
00110    virtual void unpause( const std::string& alias );
00111    
00113    virtual bool isPaused( const std::string& alias );
00114    
00121    virtual void setAmbient( const std::string& alias, bool setting = false );
00122 
00124    virtual bool isAmbient( const std::string& alias );
00125 
00131    virtual void setPitchBend( const std::string& alias, float amount );
00132 
00134    virtual void setVolume( const std::string& alias, float amount );
00135    
00139    virtual void setCutoff( const std::string& alias, float amount );
00140    
00145    virtual void setPosition( const std::string& alias, const float& x, const float& y, const float& z );
00146 
00152    virtual void getPosition( const std::string& alias, float& x, float& y, float& z );
00153 
00157    virtual void setListenerPosition( const gmtl::Matrix44f& mat );
00158 
00162    virtual void getListenerPosition( gmtl::Matrix44f& mat );
00163 
00164 
00174    virtual void changeAPI( const std::string& apiName );
00175 
00176    /*
00177     * configure the sound API global settings
00178     */
00179    virtual void configure( const snx::SoundAPIInfo& sai );
00180 
00189    virtual void configure( const std::string& alias, const snx::SoundInfo& description );
00190 
00195    virtual void remove( const std::string alias );
00196 
00201    virtual void step( const float& timeElapsed );
00202    
00203 protected:
00204    snx::ISoundImplementation& impl();
00205 
00206 private:
00208    /*#  snx::SoundFactory lnkSoundFactory; */
00209 
00213    snx::ISoundImplementation* mImplementation;
00214         
00217    /*#  snx::SoundInfo lnkSoundInfo; */
00218 
00220    /*#  snx::SoundAPIInfo lnksnx::SoundAPIInfo; */
00221 
00222    vprSingletonHeader(sonix);
00223 };
00224 
00225 #endif //SONIX___H

Generated on Sun May 2 14:39:26 2004 for Juggler Sonix by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002