mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 20:42:21 +02:00
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
This commit is contained in:
parent
aad0a640c5
commit
b63a243fd7
73 changed files with 2474 additions and 293 deletions
68
BeefySysLib/platform/win/DSoundManager.h
Normal file
68
BeefySysLib/platform/win/DSoundManager.h
Normal file
|
@ -0,0 +1,68 @@
|
|||
#ifndef __DSOUNDMANAGER_H__
|
||||
#define __DSOUNDMANAGER_H__
|
||||
|
||||
#include <dsound.h>
|
||||
#include "BFSound.h"
|
||||
|
||||
namespace Beefy
|
||||
{
|
||||
|
||||
class DSoundInstance;
|
||||
|
||||
class DSoundManager : public BFSoundManager
|
||||
{
|
||||
friend class DSoundInstance;
|
||||
friend class DSoundMusicInterface;
|
||||
|
||||
protected:
|
||||
LPDIRECTSOUNDBUFFER mSourceSounds[MAX_SOURCE_SOUNDS];
|
||||
String mSourceFileNames[MAX_SOURCE_SOUNDS];
|
||||
LPDIRECTSOUNDBUFFER mPrimaryBuffer;
|
||||
int32 mSourceDataSizes[MAX_SOURCE_SOUNDS];
|
||||
float mBaseVolumes[MAX_SOURCE_SOUNDS];
|
||||
int mBasePans[MAX_SOURCE_SOUNDS];
|
||||
DSoundInstance* mPlayingSounds[MAX_CHANNELS];
|
||||
float mMasterVolume;
|
||||
DWORD mLastReleaseTick;
|
||||
|
||||
protected:
|
||||
int FindFreeChannel();
|
||||
int VolumeToDB(float theVolume);
|
||||
bool LoadWAVSound(unsigned int theSfxID, const StringImpl& theFilename);
|
||||
void ReleaseFreeChannels();
|
||||
|
||||
public:
|
||||
LPDIRECTSOUND mDirectSound;
|
||||
|
||||
DSoundManager(HWND theHWnd);
|
||||
virtual ~DSoundManager();
|
||||
|
||||
virtual bool Initialized() override;
|
||||
|
||||
virtual bool LoadSound(unsigned int theSfxID, const StringImpl& theFilename) override;
|
||||
virtual int LoadSound(const StringImpl& theFilename) override;
|
||||
virtual void ReleaseSound(unsigned int theSfxID) override;
|
||||
|
||||
virtual void SetVolume(float theVolume) override;
|
||||
virtual bool SetBaseVolume(unsigned int theSfxID, float theBaseVolume) override;
|
||||
virtual bool SetBasePan(unsigned int theSfxID, int theBasePan) override;
|
||||
|
||||
virtual BFSoundInstance* GetSoundInstance(unsigned int theSfxID);
|
||||
|
||||
virtual void ReleaseSounds() override;
|
||||
virtual void ReleaseChannels() override;
|
||||
|
||||
virtual float GetMasterVolume() override;
|
||||
virtual void SetMasterVolume(float theVolume) override;
|
||||
|
||||
virtual void Flush() override;
|
||||
|
||||
virtual void SetCooperativeWindow(HWND theHWnd, bool isWindowed);
|
||||
virtual void StopAllSounds() override;
|
||||
virtual int GetFreeSoundId() override;
|
||||
virtual int GetNumSounds() override;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif //__DSOUNDMANAGER_H__
|
Loading…
Add table
Add a link
Reference in a new issue