diff --git a/Sources/Plasma/PubUtilLib/plAudio/plAudioSystem.cpp b/Sources/Plasma/PubUtilLib/plAudio/plAudioSystem.cpp index 6866d09a..dd4aa736 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plAudioSystem.cpp +++ b/Sources/Plasma/PubUtilLib/plAudio/plAudioSystem.cpp @@ -43,7 +43,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include #include #include -#include #ifdef EAX_SDK_AVAILABLE #include #endif @@ -1296,4 +1295,4 @@ void plgAudioSys::SetListenerOrientation(const hsVector3 view, const hsVector3 u { fSys->SetListenerOrientation(view, up); } -} \ No newline at end of file +} diff --git a/Sources/Plasma/PubUtilLib/plAudio/plAudioSystem.h b/Sources/Plasma/PubUtilLib/plAudio/plAudioSystem.h index 6055726e..332ae85c 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plAudioSystem.h +++ b/Sources/Plasma/PubUtilLib/plAudio/plAudioSystem.h @@ -134,7 +134,7 @@ protected: hsPoint3 fCurrListenerPos;//, fCommittedListenerPos; hsBool fActive, fUsingEAX, fRestartOnDestruct, fWaitingForShutdown; - __int64 fStartTime; + Int64 fStartTime; hsTArray fMyRefs; hsTArray fEAXRegions; diff --git a/Sources/Plasma/PubUtilLib/plAudio/plEAXEffects.cpp b/Sources/Plasma/PubUtilLib/plAudio/plEAXEffects.cpp index e8768e37..754135a2 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plEAXEffects.cpp +++ b/Sources/Plasma/PubUtilLib/plAudio/plEAXEffects.cpp @@ -60,10 +60,12 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plAudioSystem.h" #include -#ifdef DX_OLD_SDK - #include -#else - #include +#if HS_BUILD_FOR_WIN32 +# ifdef DX_OLD_SDK +# include +# else +# include +# endif #endif #ifdef EAX_SDK_AVAILABLE diff --git a/Sources/Plasma/PubUtilLib/plAudio/plVoiceChat.cpp b/Sources/Plasma/PubUtilLib/plAudio/plVoiceChat.cpp index 1898d749..5321bcec 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plVoiceChat.cpp +++ b/Sources/Plasma/PubUtilLib/plAudio/plVoiceChat.cpp @@ -361,8 +361,8 @@ void plVoicePlayer::PlaybackVoiceMessage(void* data, unsigned size, int numFrame return; } - BYTE* newBuff; - newBuff = (BYTE*)nBuff; // Convert to byte data + UInt8* newBuff; + newBuff = (UInt8*)nBuff; // Convert to byte data PlaybackUncompressedVoiceMessage(newBuff, numBytes); // playback uncompressed data delete[] nBuff; } @@ -411,7 +411,7 @@ plVoiceSound::plVoiceSound() fLastUpdate = 0; char keyName[32]; - StrPrintf(keyName, arrsize(keyName), "VoiceSound_%d", fCount); + snprintf(keyName, arrsize(keyName), "VoiceSound_%d", fCount); fCount++; hsgResMgr::ResMgr()->NewKey(keyName, this, plLocation::kGlobalFixedLoc); } @@ -431,7 +431,7 @@ hsBool plVoiceSound::LoadSound( hsBool is3D ) return false; // Don't set the failed flag, just return plWAVHeader header; - header.fFormatTag = WAVE_FORMAT_PCM; + header.fFormatTag = 0x1; // WAVE_FORMAT_PCM header.fBitsPerSample = 16; header.fNumChannels = 1; header.fNumSamplesPerSec = FREQUENCY; @@ -605,8 +605,8 @@ hsBool plSpeex::Encode(short *data, int numFrames, int *packedLength, hsRAMStrea short *pData = data; // pointer to input data float *input = TRACKED_NEW float[fFrameSize]; // input to speex - used as am intermediate array since speex requires float data - BYTE frameLength; // number of bytes speex compressed frame to - BYTE *frameData = TRACKED_NEW BYTE[fFrameSize]; // holds one frame of encoded data + UInt8 frameLength; // number of bytes speex compressed frame to + UInt8 *frameData = TRACKED_NEW UInt8[fFrameSize]; // holds one frame of encoded data // encode data for( int i = 0; i < numFrames; i++ ) @@ -647,8 +647,8 @@ hsBool plSpeex::Decode(UInt8 *data, int size, int numFrames, int *numOutputBytes short *pOut = out; // pointer to output short buffer // create buffer for input data - BYTE *frameData = TRACKED_NEW BYTE[fFrameSize]; // holds the current frames data to be decoded - BYTE frameLen; // holds the length of the current frame being decoded. + UInt8 *frameData = TRACKED_NEW UInt8[fFrameSize]; // holds the current frames data to be decoded + UInt8 frameLen; // holds the length of the current frame being decoded. // Decode data @@ -711,4 +711,4 @@ void plSpeex::SetComplexity(UInt8 c) { fComplexity = c; speex_encoder_ctl(fEncoderState, SPEEX_SET_COMPLEXITY, &fComplexity); -} \ No newline at end of file +} diff --git a/Sources/Plasma/PubUtilLib/plAudio/plWin32Sound.cpp b/Sources/Plasma/PubUtilLib/plAudio/plWin32Sound.cpp index 153ac384..baa0589b 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plWin32Sound.cpp +++ b/Sources/Plasma/PubUtilLib/plAudio/plWin32Sound.cpp @@ -39,7 +39,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include +#if HS_BUILD_FOR_WIN32 +# include +#else +# include +#endif #include "HeadSpin.h" #include "hsGeometry3.h" #include "hsTimer.h" diff --git a/Sources/Plasma/PubUtilLib/plAudio/plWin32StreamingSound.cpp b/Sources/Plasma/PubUtilLib/plAudio/plWin32StreamingSound.cpp index 6c73cda3..3d1fe3e6 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plWin32StreamingSound.cpp +++ b/Sources/Plasma/PubUtilLib/plAudio/plWin32StreamingSound.cpp @@ -39,12 +39,17 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include +#if HS_BUILD_FOR_WIN32 +# include +#else +# include +#endif #include "HeadSpin.h" #include "hsTimer.h" #include "hsGeometry3.h" #include "plgDispatch.h" #include "plProfile.h" +#include "plFile/hsFiles.h" #include "plWin32Sound.h" #include "plWin32StreamingSound.h" @@ -179,9 +184,9 @@ plSoundBuffer::ELoadReturnVal plWin32StreamingSound::IPreLoadBuffer( hsBool play bool streamCompressed = (buffer->HasFlag(plSoundBuffer::kStreamCompressed) != 0); /// Open da file - CHAR strPath[ MAX_PATH ]; + char strPath[ kFolderIterator_MaxPath ]; - _getcwd(strPath, MAX_PATH); + getcwd(strPath, kFolderIterator_MaxPath); if(sfxPath) strcat( strPath, "\\sfx\\" ); else @@ -506,4 +511,4 @@ void plWin32StreamingSound::IAddCallback( plEventCallbackMsg *pCBMsg ) return; } plWin32Sound::IAddCallback( pCBMsg ); -} \ No newline at end of file +} diff --git a/Sources/Plasma/PubUtilLib/plAudio/plWin32StreamingSound.h b/Sources/Plasma/PubUtilLib/plAudio/plWin32StreamingSound.h index c900d178..47715de5 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plWin32StreamingSound.h +++ b/Sources/Plasma/PubUtilLib/plAudio/plWin32StreamingSound.h @@ -43,7 +43,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #define plWin32StreamingSound_h #include "plWin32Sound.h" -#include "pnUtils/pnUtils.h" class plDSoundBuffer; class DSoundCallbackHandle; diff --git a/Sources/Plasma/PubUtilLib/plAudio/plWinMicLevel.cpp b/Sources/Plasma/PubUtilLib/plAudio/plWinMicLevel.cpp index 7c5fa6fc..04471048 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plWinMicLevel.cpp +++ b/Sources/Plasma/PubUtilLib/plAudio/plWinMicLevel.cpp @@ -51,6 +51,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com // // ////////////////////////////////////////////////////////////////////////////// +#if HS_BUILD_FOR_WIN32 + #include "hsTypes.h" #include "plWinMicLevel.h" #include "hsWindows.h" @@ -375,3 +377,4 @@ MIXERLINE *IGetMixerSubLineByType( MIXERCONTROL *mux, DWORD type ) return nil; } +#endif diff --git a/Sources/Plasma/PubUtilLib/plAudio/plWinMicLevel.h b/Sources/Plasma/PubUtilLib/plAudio/plWinMicLevel.h index 65be8601..043cf04a 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plWinMicLevel.h +++ b/Sources/Plasma/PubUtilLib/plAudio/plWinMicLevel.h @@ -42,6 +42,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef _plWinMicLevel_h #define _plWinMicLevel_h +#if HS_BUILD_FOR_WIN32 ////////////////////////////////////////////////////////////////////////////// // // // plWinMicLevel - Annoying class to deal with the annoying problem of // @@ -76,5 +77,6 @@ protected: static plWinMicLevel &IGetInstance( void ); void IShutdown( void ); }; +#endif // HS_BUILD_FOR_WIN32 -#endif // _plWinMicLevel_h \ No newline at end of file +#endif // _plWinMicLevel_h