00001 #ifndef RAGE_SOUND_ALSA9_SOFTWARE_H 00002 #define RAGE_SOUND_ALSA9_SOFTWARE_H 00003 00004 #include "RageSound.h" 00005 #include "RageThreads.h" 00006 #include "RageSoundDriver_Generic_Software.h" 00007 00008 #include "ALSA9Helpers.h" 00009 00010 class RageSound_ALSA9_Software: public RageSound_Generic_Software 00011 { 00012 private: 00013 bool shutdown; 00014 00015 Alsa9Buf *pcm; 00016 00017 static int MixerThread_start(void *p); 00018 void MixerThread(); 00019 RageThread MixingThread; 00020 00021 bool GetData(); 00022 00023 public: 00024 /* virtuals: */ 00025 int64_t GetPosition( const RageSoundBase *snd ) const; 00026 float GetPlayLatency() const; 00027 int GetSampleRate( int rate ) const; 00028 00029 void SetupDecodingThread(); 00030 00031 00032 RageSound_ALSA9_Software(); 00033 CString Init(); 00034 ~RageSound_ALSA9_Software(); 00035 }; 00036 00037 #endif 00038 00039 /* 00040 * (c) 2002-2004 Glenn Maynard, Aaron VonderHaar 00041 * All rights reserved. 00042 * 00043 * Permission is hereby granted, free of charge, to any person obtaining a 00044 * copy of this software and associated documentation files (the 00045 * "Software"), to deal in the Software without restriction, including 00046 * without limitation the rights to use, copy, modify, merge, publish, 00047 * distribute, and/or sell copies of the Software, and to permit persons to 00048 * whom the Software is furnished to do so, provided that the above 00049 * copyright notice(s) and this permission notice appear in all copies of 00050 * the Software and that both the above copyright notice(s) and this 00051 * permission notice appear in supporting documentation. 00052 * 00053 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00054 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00055 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF 00056 * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS 00057 * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT 00058 * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 00059 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 00060 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00061 * PERFORMANCE OF THIS SOFTWARE. 00062 */