1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 20:12:21 +02:00
Beef/BeefySysLib/platform/win/DSoundInstance.h
Brian Fiete b63a243fd7 Working on installer, fixing more Win32 issues
Throwing error on member references with ".." cascade token outside invocations (ie: "ts..mA = 123")
Fixed 'Thread.ModuleTLSIndex' error - which caused us TLS lookup failures in Beef DLLs
Fixed some hotswap errors
Made BeefPerf shut down properly
Fixed an 'int literal' FixIntUnknown issue where rhs was System.Object which caused an illegal boxing
Fixed COFF::LocateSymbol issues with Win32 and also with linking to static libraries - showed up with hot-linking in fmod when hot-adding a floating point mod
Fixed a couple memory leaks
Fixed alignment issue in COFF::ParseCompileUnit
2019-09-02 17:39:47 -07:00

60 lines
No EOL
1.3 KiB
C++

#ifndef __DSOUNDINSTANCE_H__
#define __DSOUNDINSTANCE_H__
#include <dsound.h>
#include "BFSound.h"
//#define _LPCWAVEFORMATEX_DEFINED
namespace Beefy
{
class DSoundManager;
class DSoundInstance : public BFSoundInstance
{
friend class DSoundManager;
protected:
DSoundManager* mSoundManagerP;
LPDIRECTSOUNDBUFFER mSourceSoundBuffer;
LPDIRECTSOUNDBUFFER mSoundBuffer;
bool mAutoRelease;
bool mHasPlayed;
bool mReleased;
int mBasePan;
float mBaseVolume;
int mPan;
float mVolume;
DWORD mDefaultFrequency;
protected:
void RehupVolume();
void RehupPan();
public:
DSoundInstance(DSoundManager* theSoundManager, LPDIRECTSOUNDBUFFER theSourceSound);
virtual ~DSoundInstance();
virtual void Release() override;
virtual void SetBaseVolume(float theBaseVolume) override;
virtual void SetBasePan(int theBasePan) override;
virtual void SetVolume(float theVolume) override;
virtual void SetPan(int thePosition) override; //-hundredth db to +hundredth db = left to right
virtual void AdjustPitch(float theNumSteps) override;
virtual bool Play(bool looping, bool autoRelease) override;
virtual void Stop() override;
virtual bool IsPlaying() override;
virtual bool IsReleased() override;
virtual float GetVolume() override;
};
}
#endif //__DSOUNDINSTANCE_H__