Move git root from Client/ to src/ to track all source code: - Client: Game client source (moved to Client/Client/) - Server: Game server source - GameTools: Development tools - CryptoSource: Encryption utilities - database: Database scripts - Script: Game scripts - rylCoder_16.02.2008_src: Legacy coder tools - GMFont, Game: Additional resources 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
65 lines
1.7 KiB
C++
65 lines
1.7 KiB
C++
|
|
#ifndef _DirectMusic_H_
|
|
#define _DirectMusic_H_
|
|
|
|
#include "SoundGlobal.h"
|
|
#include "STL.h"
|
|
|
|
class CMusicBuffer;
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////////////
|
|
//
|
|
|
|
class CDirectMusic
|
|
{
|
|
private:
|
|
CDirectMusic( const CDirectMusic & ); //»ç¿ë ¸øÇϵµ·Ï ¸·¾Æ³õÀ½.
|
|
CDirectMusic & operator=( const CDirectMusic & );
|
|
|
|
protected:
|
|
CDirectMusic();
|
|
|
|
protected:
|
|
IDirectMusicLoader8 * m_pWavLoader;
|
|
IDirectMusicLoader8 * m_pOggLoader;
|
|
IDirectMusicPerformance8 * m_pPerformance;
|
|
bool m_bCOMInitialized;
|
|
|
|
IDirectSound3DListener * m_pDSListener;
|
|
|
|
typedef std::set<CMusicBuffer*> MUSICBUFFERS;
|
|
|
|
MUSICBUFFERS * m_pMusicBuffers;
|
|
|
|
protected:
|
|
void ClearMusicBuffers();
|
|
void Get3DListener();
|
|
|
|
public:
|
|
static CDirectMusic & GetInstance();
|
|
~CDirectMusic();
|
|
|
|
void Create( HWND, DWORD dwPChannels = 128 );
|
|
void Destroy();
|
|
|
|
void SetSearchDirectory( const char * );
|
|
void CollectGarbage();
|
|
|
|
void SetDoppler( D3DVALUE distance, D3DVALUE doppler );
|
|
void SetRolloff( D3DVALUE rolloff );
|
|
void Set3DOrientation( D3DVALUE xFront, D3DVALUE yFront, D3DVALUE zFront
|
|
, D3DVALUE xTop, D3DVALUE yTop, D3DVALUE zTop );
|
|
void SetVelocity( D3DVALUE x, D3DVALUE y, D3DVALUE z );
|
|
void SetPosition( D3DVALUE x, D3DVALUE y, D3DVALUE z );
|
|
|
|
CMusicBuffer & NewMusicBuffer();
|
|
void DeleteMusicBuffer( CMusicBuffer & musicBuffer );
|
|
|
|
IDirectMusicLoader8 * GetWavLoader() { return m_pWavLoader; }
|
|
IDirectMusicLoader8 * GetOggLoader() { return m_pOggLoader; }
|
|
IDirectMusicPerformance8 * GetPerformance() { return m_pPerformance; }
|
|
};
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
#endif |