Platform_Win32_Sound_SoundStream_DSound.h
Go to the documentation of this file.00001 00011 #ifndef __Platform_Win32_Sound_SoundStream_DSound_H__ 00012 #define __Platform_Win32_Sound_SoundStream_DSound_H__ 00013 00014 // Includes 00015 #include "Platform_Sound_SoundStream.h" 00016 00017 // Forward declares 00018 struct IDirectSound; 00019 struct IDirectSoundBuffer; 00020 00021 // Platform_Win32_Sound_SoundStream_DSound 00022 class Platform_Win32_Sound_SoundStream_DSound : public Platform_Sound_SoundStream 00023 { 00024 public: 00025 Platform_Win32_Sound_SoundStream_DSound( 00026 IDirectSound* directSound, 00027 int channels, 00028 int frequency, 00029 int bitsPerSample, 00030 int size 00031 ); 00032 virtual ~Platform_Win32_Sound_SoundStream_DSound(); 00033 00034 00035 virtual void Play(); 00036 virtual void Stop(); 00037 00038 virtual int GetPosition(); 00039 virtual void SetPosition(int position); 00040 00041 virtual void CopySoundToBuffer(int bufferOffset, const void* soundData, int bytesToCopy); 00042 virtual void ClearBuffer(int bufferOffset, int bytesToClear); 00043 00044 virtual int GetChannels(); 00045 virtual int GetFrequency(); 00046 virtual int GetBitsPerSample(); 00047 virtual int GetSize(); 00048 00049 virtual void SetVolume(float level); 00050 virtual float GetVolume(); 00051 00052 private: 00053 int ConvertLinearLevelToDirectSoundLevel(float level); 00054 00055 private: 00056 IDirectSoundBuffer* soundBuffer_; 00057 int channels_; 00058 int frequency_; 00059 int bitsPerSample_; 00060 int size_; 00061 float volume_; 00062 }; 00063 00064 #endif /* __Platform_Win32_Sound_SoundStream_DSound_H__ */
Reproduction/republishing of any material on this site without permission is strictly prohibited.
