Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

SoundPlayThread.h

Go to the documentation of this file.
00001 //-*-c++-*-
00002 #ifndef INCLUDED_SoundPlayThread_h_
00003 #define INCLUDED_SoundPlayThread_h_
00004 
00005 #include "IPC/PollThread.h"
00006 
00007 class SoundPlayThread : public PollThread {
00008 public:
00009   static const long BUFFER_TIME=32;
00010   static const unsigned int NUM_BUFFERS=2;
00011   SoundPlayThread() : PollThread(0L,BUFFER_TIME,true,false), buf(NULL), bufsize(0), buffersInFlight(0) {}
00012   virtual ~SoundPlayThread() { delete buf; buf=NULL; }
00013   
00014   void reset();
00015   
00016 protected:
00017   virtual bool launched();
00018   virtual bool poll();
00019   
00020   char * buf;
00021   size_t bufsize;
00022   unsigned int buffersInFlight;
00023   
00024 private:
00025   SoundPlayThread(const SoundPlayThread& l); //!< don't call
00026   SoundPlayThread& operator=(const SoundPlayThread& l); //!< don't call
00027 };
00028 
00029 /*! @file
00030  * @brief 
00031  * @author Ethan Tira-Thompson (ejt) (Creator)
00032  *
00033  * $Author: ejt $
00034  * $Name: tekkotsu-4_0 $
00035  * $Revision: 1.2 $
00036  * $State: Exp $
00037  * $Date: 2007/02/16 20:18:23 $
00038  */
00039 
00040 #endif

Tekkotsu Hardware Abstraction Layer 4.0
Generated Thu Nov 22 01:00:53 2007 by Doxygen 1.5.4