mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-19 03:39:08 +00:00
Fixes for plAudio errors.
This commit is contained in:
@ -43,7 +43,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include <al.h>
|
||||
#include <alc.h>
|
||||
#include <efx.h>
|
||||
#include <MMREG.H>
|
||||
#ifdef EAX_SDK_AVAILABLE
|
||||
#include <eax.h>
|
||||
#endif
|
||||
@ -1296,4 +1295,4 @@ void plgAudioSys::SetListenerOrientation(const hsVector3 view, const hsVector3 u
|
||||
{
|
||||
fSys->SetListenerOrientation(view, up);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -134,7 +134,7 @@ protected:
|
||||
|
||||
hsPoint3 fCurrListenerPos;//, fCommittedListenerPos;
|
||||
hsBool fActive, fUsingEAX, fRestartOnDestruct, fWaitingForShutdown;
|
||||
__int64 fStartTime;
|
||||
Int64 fStartTime;
|
||||
|
||||
hsTArray<hsKeyedObject *> fMyRefs;
|
||||
hsTArray<plEAXListenerMod *> fEAXRegions;
|
||||
|
@ -60,10 +60,12 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include "plAudioSystem.h"
|
||||
#include <al.h>
|
||||
|
||||
#ifdef DX_OLD_SDK
|
||||
#include <dxerr9.h>
|
||||
#else
|
||||
#include <dxerr.h>
|
||||
#if HS_BUILD_FOR_WIN32
|
||||
# ifdef DX_OLD_SDK
|
||||
# include <dxerr9.h>
|
||||
# else
|
||||
# include <dxerr.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef EAX_SDK_AVAILABLE
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -39,7 +39,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
Mead, WA 99021
|
||||
|
||||
*==LICENSE==*/
|
||||
#include <direct.h>
|
||||
#if HS_BUILD_FOR_WIN32
|
||||
# include <direct.h>
|
||||
#else
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
#include "HeadSpin.h"
|
||||
#include "hsGeometry3.h"
|
||||
#include "hsTimer.h"
|
||||
|
@ -39,12 +39,17 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
Mead, WA 99021
|
||||
|
||||
*==LICENSE==*/
|
||||
#include <direct.h>
|
||||
#if HS_BUILD_FOR_WIN32
|
||||
# include <direct.h>
|
||||
#else
|
||||
# include <unistd.h>
|
||||
#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 );
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
#endif // _plWinMicLevel_h
|
||||
|
Reference in New Issue
Block a user