diff options
Diffstat (limited to 'Minecraft.Client/Common/Audio/SoundEngine.h')
| -rw-r--r-- | Minecraft.Client/Common/Audio/SoundEngine.h | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/Minecraft.Client/Common/Audio/SoundEngine.h b/Minecraft.Client/Common/Audio/SoundEngine.h index 92c99d23..5bd2fe4b 100644 --- a/Minecraft.Client/Common/Audio/SoundEngine.h +++ b/Minecraft.Client/Common/Audio/SoundEngine.h @@ -4,6 +4,8 @@ class Options; using namespace std; #include "..\..\Minecraft.World\SoundTypes.h" +#include "miniaudio.h" + enum eMUSICFILES { eStream_Overworld_Calm1 = 0, @@ -76,7 +78,11 @@ enum MUSIC_STREAMSTATE typedef struct { + #ifndef _WINDOWS64 F32 x,y,z,volume,pitch; + #else + float x,y,z,volume,pitch; + #endif int iSound; bool bIs3D; bool bUseSoundsPitchVal; @@ -86,6 +92,17 @@ typedef struct } AUDIO_INFO; +#ifdef _WINDOWS64 +struct MiniAudioSound +{ + ma_sound sound; + AUDIO_INFO info; + bool active; +}; + +extern std::vector<MiniAudioSound*> m_activeSounds; +#endif + class SoundEngine : public ConsoleSoundEngine { static const int MAX_SAME_SOUNDS_PLAYING = 8; // 4J added @@ -112,7 +129,7 @@ public: int getMusicID(int iDomain); int getMusicID(const wstring& name); void SetStreamingSounds(int iOverworldMin, int iOverWorldMax, int iNetherMin, int iNetherMax, int iEndMin, int iEndMax, int iCD1); - void updateMiles(); // AP added so Vita can update all the Miles functions during the mixer callback + void updateMiniAudio(); void playMusicUpdate(); private: @@ -126,9 +143,10 @@ private: int GetRandomishTrack(int iStart,int iEnd); - HMSOUNDBANK m_hBank; - HDIGDRIVER m_hDriver; - HSTREAM m_hStream; + ma_engine m_engine; + ma_engine_config m_engineConfig; + ma_sound m_musicStream; + bool m_musicStreamActive; static char m_szSoundPath[]; static char m_szMusicPath[]; @@ -165,4 +183,4 @@ private: #ifdef __ORBIS__ int32_t m_hBGMAudio; #endif -}; +};
\ No newline at end of file |
