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

panda/src/audio/nullAudioSound.h

Go to the documentation of this file.
00001 // Filename: nullAudioSound.h
00002 // Created by:  skyler (June 6, 2001)
00003 // Prior system by: cary
00004 //
00005 ////////////////////////////////////////////////////////////////////
00006 //
00007 // PANDA 3D SOFTWARE
00008 // Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
00009 //
00010 // All use of this software is subject to the terms of the Panda 3d
00011 // Software license.  You should have received a copy of this license
00012 // along with this source code; you will also find a current copy of
00013 // the license at http://www.panda3d.org/license.txt .
00014 //
00015 // To contact the maintainers of this program write to
00016 // panda3d@yahoogroups.com .
00017 //
00018 ////////////////////////////////////////////////////////////////////
00019 
00020 #ifndef __NULL_AUDIO_SOUND_H__
00021 #define __NULL_AUDIO_SOUND_H__
00022 
00023 #include "audioSound.h"
00024 
00025 
00026 // This class intentionally does next to nothing.
00027 // It's used as a placeholder when you don't want a sound
00028 // system.
00029 class EXPCL_PANDA NullAudioSound : public AudioSound {
00030   // All of these methods are stubbed out to some degree.
00031   // If you're looking for a starting place for a new AudioManager,
00032   // please consider looking at the milesAudioManager.
00033 
00034 public:
00035   ~NullAudioSound();
00036   
00037   void play();
00038   void stop();
00039   
00040   void set_loop(bool);
00041   bool get_loop() const;
00042   
00043   void set_loop_count(unsigned long);
00044   unsigned long get_loop_count() const;
00045   
00046   void set_time(float);
00047   float get_time() const;
00048   
00049   void set_volume(float);
00050   float get_volume() const;
00051   
00052   void set_balance(float);
00053   float get_balance() const;
00054 
00055   void set_active(bool);
00056   bool get_active() const;
00057   
00058   const string& get_name() const;
00059   
00060   float length() const;
00061 
00062   AudioSound::SoundStatus status() const;
00063 
00064 // why protect the constructor?!?
00065 //protected:
00066   NullAudioSound();
00067 
00068   friend class NullAudioManager;
00069 };
00070 
00071 #endif /* __NULL_AUDIO_SOUND_H__ */

Generated on Fri May 2 00:34:30 2003 for Panda by doxygen1.3