00001 /* 00002 $Id: soundcard_clan.h,v 1.1 2001/03/06 15:09:26 mbn Exp $ 00003 00004 ------------------------------------------------------------------------ 00005 ClanLib, the platform independent game SDK. 00006 00007 This library is distributed under the GNU LIBRARY GENERAL PUBLIC LICENSE 00008 version 2. See COPYING for details. 00009 00010 For a total list of contributers see CREDITS. 00011 00012 ------------------------------------------------------------------------ 00013 */ 00014 00015 #ifndef header_soundcard_clan 00016 #define header_soundcard_clan 00017 00018 #ifdef USE_CLANSOUND 00019 00020 #include "API/Core/System/mutex.h" 00021 #include "API/Core/System/thread.h" 00022 #include "Sound/Sound/Generic/soundcard_generic.h" 00023 #include "mixer.h" 00024 00025 class CL_SoundCard_ClanSound : public CL_SoundCard_Generic, CL_Runnable 00026 { 00027 public: 00028 CL_SoundCard_ClanSound(); 00029 virtual ~CL_SoundCard_ClanSound(); 00030 00031 // Member vars from CL_SoundCard: 00032 // CL_String name; 00033 // int card_no; 00034 00035 // Functions inherited from API: 00036 // ----------------------------- 00037 virtual CL_StreamSoundProvider *get_microphone(); 00038 virtual CL_StreamSoundProvider *get_line_in(); 00039 00040 virtual void stop_all(); 00041 virtual void set_global_volume(int volume); 00042 virtual void set_global_pan(int pan); 00043 00044 // Functions inherited from Generic: 00045 // --------------------------------- 00046 virtual CL_CardSoundBuffer_Static *create_soundbuffer_static( 00047 CL_SoundBuffer_Generic *owner, 00048 CL_StaticSoundProvider *provider); 00049 00050 virtual CL_CardSoundBuffer_Playback *create_cardsoundbuffer_playback_streamed( 00051 CL_SoundBuffer_Generic_Stream *provider); 00052 00053 // Functions exported to CL_CardSoundBuffer_Playback: 00054 // -------------------------------------------------- 00055 void add(CL_CardPlayback_ClanSound *playback); 00056 void remove(CL_CardPlayback_ClanSound *playback); 00057 00058 CL_Mutex *get_mutex(); 00059 00060 private: 00061 CL_CSMixer mixer; 00062 CL_Mutex *mutex; 00063 CL_Thread *thread; 00064 volatile bool exit_thread; 00065 00066 virtual void run(); 00067 // Runs the mixer sound thread. 00068 }; 00069 00070 #endif /* USE_CLANSOUND */ 00071 00072 #endif
1.2.6 written by Dimitri van Heesch,
© 1997-2001