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

device_mm.h

Go to the documentation of this file.
00001 #ifndef DEVICE_MM_H
00002 #define DEVICE_MM_H
00003 
00004 
00005 #include <windows.h>
00006 #include <mmsystem.h>
00007 #include <queue>
00008 #include "internal.h"
00009 #include "device_mixer.h"
00010 #include "utility.h"
00011 
00012 
00013 namespace audiere {
00014 
00015   class MMAudioDevice : public MixerDevice
00016   {
00017   public:
00018     static MMAudioDevice* create(const ParameterList& parameters);
00019 
00020   private:
00021     MMAudioDevice(HWAVEOUT device, int rate);
00022     ~MMAudioDevice();
00023 
00024   public:
00025     void ADR_CALL update();
00026 
00027   private:
00028     // 16 buffers of 1000 frames is 4000 frames at 44100 Hz is about
00029     // 364 milliseconds of audio
00030     enum {
00031       BUFFER_COUNT  = 16,
00032       BUFFER_LENGTH = 1000 * 4, // 1000 samples, 4000 bytes
00033     };
00034 
00035     HWAVEOUT m_device;
00036 
00037     int m_current_buffer;
00038     WAVEHDR m_buffers[BUFFER_COUNT];
00039     u8 m_samples[BUFFER_COUNT * BUFFER_LENGTH];
00040 
00041     friend class MMOutputStream;
00042   };
00043 
00044 }
00045 
00046 
00047 #endif

Generated on Sat Oct 12 01:43:02 2002 for audiere by doxygen1.2.17