device_ds_buffer.h

Go to the documentation of this file.
00001 #ifndef DEVICE_DS_BUFFER_H
00002 #define DEVICE_DS_BUFFER_H
00003 
00004 
00005 #include <windows.h>
00006 #include <mmsystem.h>
00007 #include <dsound.h>
00008 #include "audiere.h"
00009 
00010 
00011 namespace audiere {
00012 
00013   class DSAudioDevice;
00014 
00015   class DSOutputBuffer : public RefImplementation<OutputStream> {
00016   public:
00017     DSOutputBuffer(
00018       DSAudioDevice* device,
00019       IDirectSoundBuffer* buffer,
00020       int length,
00021       int frame_size);
00022     ~DSOutputBuffer();
00023 
00024     void ADR_CALL play();
00025     void ADR_CALL stop();
00026     bool ADR_CALL isPlaying();
00027     void ADR_CALL reset();
00028 
00029     void ADR_CALL setRepeat(bool repeat);
00030     bool ADR_CALL getRepeat();
00031 
00032     void  ADR_CALL setVolume(float volume);
00033     float ADR_CALL getVolume();
00034 
00035     void  ADR_CALL setPan(float pan);
00036     float ADR_CALL getPan();
00037 
00038     void  ADR_CALL setPitchShift(float shift);
00039     float ADR_CALL getPitchShift();
00040 
00041     bool ADR_CALL isSeekable();
00042     int  ADR_CALL getLength();
00043     void ADR_CALL setPosition(int position);
00044     int  ADR_CALL getPosition();
00045 
00046   private:
00047     void update(); 
00048 
00049     RefPtr<DSAudioDevice> m_device;
00050     IDirectSoundBuffer* m_buffer;
00051     int m_length;
00052     int m_frame_size;
00053 
00054     int m_base_frequency;
00055 
00056     bool  m_repeating;
00057     float m_volume;
00058     float m_pan;
00059 
00060     HANDLE m_stop_event;
00061 
00062     friend class DSAudioDevice;
00063   };
00064 
00065 }
00066 
00067 
00068 #endif

Generated on Mon Feb 13 23:07:46 2006 for audiere by  doxygen 1.4.6