00001 #ifndef DEVICE_DS_BUFFER_H 00002 #define DEVICE_DS_BUFFER_H 00003 00004 00005 #include <windows.h> 00006 #include <mmreg.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 RefPtr<DSAudioDevice> m_device; 00048 IDirectSoundBuffer* m_buffer; 00049 int m_length; 00050 int m_frame_size; 00051 00052 int m_base_frequency; 00053 00054 bool m_repeating; 00055 float m_volume; 00056 float m_pan; 00057 }; 00058 00059 } 00060 00061 00062 #endif
1.2.17