2
3
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-14 02:27:40 -04:00

Merge branch 'master' into asyncfixes

This commit is contained in:
2011-04-28 21:26:54 -04:00
302 changed files with 2109 additions and 3688 deletions

View File

@ -3,8 +3,6 @@ include_directories("../../FeatureLib")
include_directories("../../NucleusLib")
include_directories("../../PubUtilLib")
include_directories(${OPENSSL_INCLUDE_DIR})
set(plAgeDescription_SOURCES
plAgeDescription.cpp
plAgeManifest.cpp

View File

@ -4,8 +4,6 @@ include_directories("../../NucleusLib/inc")
include_directories("../../NucleusLib")
include_directories("../../PubUtilLib")
include_directories(${OPENSSL_INCLUDE_DIR})
set(plAgeLoader_SOURCES
plAgeLoader.cpp
plAgeLoaderPaging.cpp

View File

@ -46,8 +46,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plStatusLog/plStatusLog.h"
#include <dsound.h>
UInt32 plDSoundBuffer::fNumBuffers = 0;
plProfile_CreateCounterNoReset( "Playing", "Sound", SoundPlaying );
plProfile_CreateCounterNoReset( "Allocated", "Sound", NumAllocated );
@ -89,20 +87,10 @@ plDSoundBuffer::~plDSoundBuffer()
void plDSoundBuffer::IAllocate( UInt32 size, plWAVHeader &bufferDesc, hsBool enable3D, hsBool tryStatic )
{
// Create a DSound buffer description
fBufferDesc = TRACKED_NEW DSBUFFERDESC;
fBufferDesc->dwSize = sizeof( DSBUFFERDESC );
fBufferDesc->dwBufferBytes = size;
fBufferDesc->dwReserved = 0;
fBufferDesc = TRACKED_NEW plWAVHeader;
*fBufferDesc = bufferDesc;
fBufferDesc->lpwfxFormat = TRACKED_NEW WAVEFORMATEX;
fBufferDesc->lpwfxFormat->cbSize = 0;
fBufferDesc->lpwfxFormat->nAvgBytesPerSec = bufferDesc.fAvgBytesPerSec;
fBufferDesc->lpwfxFormat->nBlockAlign = bufferDesc.fBlockAlign;
fBufferDesc->lpwfxFormat->nChannels = bufferDesc.fNumChannels;
fBufferDesc->lpwfxFormat->nSamplesPerSec = bufferDesc.fNumSamplesPerSec;
fBufferDesc->lpwfxFormat->wBitsPerSample = bufferDesc.fBitsPerSample;
fBufferDesc->lpwfxFormat->wFormatTag = bufferDesc.fFormatTag;
fBufferSize = size;
// Do we want to try EAX?
if( plgAudioSys::UsingEAX() )
@ -133,14 +121,10 @@ void plDSoundBuffer::IRelease( void )
alGetError();
memset(streamingBuffers, 0, STREAMING_BUFFERS * sizeof(unsigned));
if( fBufferDesc != nil )
{
delete fBufferDesc->lpwfxFormat;
fBufferDesc->lpwfxFormat = nil;
}
delete fBufferDesc;
fBufferDesc = nil;
fBufferSize = 0;
fValid = false;
plProfile_Dec( NumAllocated );
@ -181,7 +165,7 @@ bool plDSoundBuffer::FillBuffer(void *data, unsigned bytes, plWAVHeader *header)
source = 0;
buffer = 0;
ALenum format = IGetALFormat(fBufferDesc->lpwfxFormat->wBitsPerSample, fBufferDesc->lpwfxFormat->nChannels);
ALenum format = IGetALFormat(fBufferDesc->fBitsPerSample, fBufferDesc->fNumChannels);
ALenum error = alGetError();
alGenBuffers(1, &buffer);
error = alGetError();
@ -264,8 +248,8 @@ bool plDSoundBuffer::SetupStreamingSource(plAudioFileReader *stream)
return false;
}
ALenum format = IGetALFormat(fBufferDesc->lpwfxFormat->wBitsPerSample, fBufferDesc->lpwfxFormat->nChannels);
alBufferData( streamingBuffers[i], format, data, size, fBufferDesc->lpwfxFormat->nSamplesPerSec );
ALenum format = IGetALFormat(fBufferDesc->fBitsPerSample, fBufferDesc->fNumChannels);
alBufferData( streamingBuffers[i], format, data, size, fBufferDesc->fNumSamplesPerSec );
if( (error = alGetError()) != AL_NO_ERROR )
plStatusLog::AddLineS("audio.log", "alBufferData");
}
@ -330,8 +314,8 @@ bool plDSoundBuffer::SetupStreamingSource(void *data, unsigned bytes)
return false;
}
ALenum format = IGetALFormat(fBufferDesc->lpwfxFormat->wBitsPerSample, fBufferDesc->lpwfxFormat->nChannels);
alBufferData( streamingBuffers[i], format, bufferData, size, fBufferDesc->lpwfxFormat->nSamplesPerSec );
ALenum format = IGetALFormat(fBufferDesc->fBitsPerSample, fBufferDesc->fNumChannels);
alBufferData( streamingBuffers[i], format, bufferData, size, fBufferDesc->fNumSamplesPerSec );
if( (error = alGetError()) != AL_NO_ERROR )
plStatusLog::AddLineS("audio.log", "alBufferData");
}
@ -434,8 +418,8 @@ bool plDSoundBuffer::StreamingFillBuffer(plAudioFileReader *stream)
{ unsigned int size = stream->NumBytesLeft() < STREAM_BUFFER_SIZE ? stream->NumBytesLeft() : STREAM_BUFFER_SIZE;
stream->Read(size, data);
ALenum format = IGetALFormat(fBufferDesc->lpwfxFormat->wBitsPerSample, fBufferDesc->lpwfxFormat->nChannels);
alBufferData( bufferId, format, data, size, fBufferDesc->lpwfxFormat->nSamplesPerSec );
ALenum format = IGetALFormat(fBufferDesc->fBitsPerSample, fBufferDesc->fNumChannels);
alBufferData( bufferId, format, data, size, fBufferDesc->fNumSamplesPerSec );
if( (error = alGetError()) != AL_NO_ERROR )
{
plStatusLog::AddLineS("audio.log", "Failed to copy data to sound buffer %d", error);
@ -550,8 +534,8 @@ bool plDSoundBuffer::VoiceFillBuffer(void *data, unsigned bytes, unsigned buffer
ALenum error;
unsigned int size = bytes < STREAM_BUFFER_SIZE ? bytes : STREAM_BUFFER_SIZE;
ALenum format = IGetALFormat(fBufferDesc->lpwfxFormat->wBitsPerSample, fBufferDesc->lpwfxFormat->nChannels);
alBufferData( bufferId, format, data, size, fBufferDesc->lpwfxFormat->nSamplesPerSec );
ALenum format = IGetALFormat(fBufferDesc->fBitsPerSample, fBufferDesc->fNumChannels);
alBufferData( bufferId, format, data, size, fBufferDesc->fNumSamplesPerSec );
if( (error = alGetError()) != AL_NO_ERROR )
{
plStatusLog::AddLineS("audio.log", "Failed to copy data to sound buffer %d", error);
@ -703,17 +687,17 @@ hsBool plDSoundBuffer::IsEAXAccelerated( void ) const
UInt32 plDSoundBuffer::BytePosToMSecs( UInt32 bytePos ) const
{
return (UInt32)(bytePos * 1000 / (hsScalar)fBufferDesc->lpwfxFormat->nAvgBytesPerSec);
return (UInt32)(bytePos * 1000 / (hsScalar)fBufferDesc->fAvgBytesPerSec);
}
//// GetBufferBytePos ////////////////////////////////////////////////////////
UInt32 plDSoundBuffer::GetBufferBytePos( hsScalar timeInSecs ) const
{
hsAssert( fBufferDesc != nil && fBufferDesc->lpwfxFormat != nil, "Nil buffer description when calling GetBufferBytePos()" );
hsAssert( fBufferDesc != nil, "Nil buffer description when calling GetBufferBytePos()" );
UInt32 byte = (UInt32)( timeInSecs * (hsScalar)fBufferDesc->lpwfxFormat->nSamplesPerSec );
byte *= fBufferDesc->lpwfxFormat->nBlockAlign;
UInt32 byte = (UInt32)( timeInSecs * (hsScalar)fBufferDesc->fNumSamplesPerSec );
byte *= fBufferDesc->fBlockAlign;
return byte;
}
@ -722,7 +706,7 @@ UInt32 plDSoundBuffer::GetBufferBytePos( hsScalar timeInSecs ) const
UInt32 plDSoundBuffer::GetLengthInBytes( void ) const
{
return (UInt32)fBufferDesc->dwBufferBytes;
return fBufferSize;
}
//// SetEAXSettings //////////////////////////////////////////////////////////
@ -736,7 +720,7 @@ void plDSoundBuffer::SetEAXSettings( plEAXSourceSettings *settings, hsBool f
UInt8 plDSoundBuffer::GetBlockAlign( void ) const
{
return ( fBufferDesc != nil && fBufferDesc->lpwfxFormat != nil ) ? fBufferDesc->lpwfxFormat->nBlockAlign : 0;
return ( fBufferDesc != nil ) ? fBufferDesc->fBlockAlign : 0;
}
//// SetScalarVolume /////////////////////////////////////////////////////////

View File

@ -46,9 +46,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
class plWAVHeader;
class plAudioFileReader;
typedef struct tWAVEFORMATEX WAVEFORMATEX;
typedef struct _DSBUFFERDESC DSBUFFERDESC;
// Ported to OpenAL from DirectSound May 2006. Idealy the openal sources would be seperate from this class.
// OpenAl sound buffer, and source.
@ -127,7 +124,8 @@ protected:
hsTArray<UInt32> fPosNotifys;
bool fStreaming;
DSBUFFERDESC* fBufferDesc;
plWAVHeader* fBufferDesc;
UInt32 fBufferSize;
unsigned buffer; // used if this is not a streaming buffer
unsigned streamingBuffers[STREAMING_BUFFERS]; // used if this is a streaming buffer

View File

@ -30,8 +30,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include <al.h>
#include <alc.h>
#include "plDSoundBuffer.h"
#include <speex.h>
#include <speex_bits.h>
#include <speex/speex.h>
#include <speex/speex_bits.h>
#include "hsGeometry3.h"
#include "plVoiceChat.h"
#include "plAudioSystem.h"
@ -535,13 +535,13 @@ hsBool plSpeex::Init(Mode mode)
if(mode == kNarrowband)
{
fEncoderState = speex_encoder_init(&speex_nb_mode); // narrowband
fDecoderState = speex_decoder_init(&speex_nb_mode);
fEncoderState = speex_encoder_init(speex_lib_get_mode(SPEEX_MODEID_NB)); // narrowband
fDecoderState = speex_decoder_init(speex_lib_get_mode(SPEEX_MODEID_NB));
}
else if(mode == kWideband)
{
fEncoderState = speex_encoder_init(&speex_wb_mode);
fDecoderState = speex_decoder_init(&speex_wb_mode);
fEncoderState = speex_encoder_init(speex_lib_get_mode(SPEEX_MODEID_WB));
fDecoderState = speex_decoder_init(speex_lib_get_mode(SPEEX_MODEID_WB));
}
speex_encoder_ctl(fEncoderState, SPEEX_GET_FRAME_SIZE, &fFrameSize); // get frame size

View File

@ -33,9 +33,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
// //
//////////////////////////////////////////////////////////////////////////////
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <math.h>
#include <vorbis/codec.h>

View File

@ -4,7 +4,6 @@ include_directories("../../NucleusLib/inc")
include_directories("../../NucleusLib")
include_directories("../../PubUtilLib")
include_directories(${OPENSSL_INCLUDE_DIR})
include_directories(${OPENAL_INCLUDE_DIR})
set(plAvatar_SOURCES

View File

@ -2,8 +2,6 @@ include_directories("../../CoreLib")
include_directories("../../NucleusLib")
include_directories("../../PubUtilLib")
include_directories(${OPENSSL_INCLUDE_DIR})
set(plEncryption_SOURCES
plChecksum.cpp
)

View File

@ -54,6 +54,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#if HS_BUILD_FOR_WIN32
#include <direct.h>
#include <io.h>
#define mkdir _mkdir
#define chdir _chdir
#define chmod _chmod
#define rmdir _rmdir
#define unlink _unlink
#endif
#if HS_BUILD_FOR_UNIX

View File

@ -3,8 +3,6 @@ include_directories("../../NucleusLib/inc")
include_directories("../../NucleusLib")
include_directories("../../PubUtilLib")
include_directories(${OPENSSL_INCLUDE_DIR})
set(plGLight_SOURCES
plDirectShadowMaster.cpp
plLightInfo.cpp

View File

@ -4,7 +4,6 @@ include_directories("../../NucleusLib")
include_directories("../../PubUtilLib")
include_directories(${DirectX_INCLUDE_DIR})
include_directories(${OPENSSL_INCLUDE_DIR})
include_directories(${OPENAL_INCLUDE_DIR})
set(plInputCore_SOURCES

View File

@ -6,7 +6,6 @@ include_directories("../../PubUtilLib")
include_directories(${PHYSX_INCLUDE_DIRS})
include_directories(${OPENAL_INCLUDE_DIR})
include_directories(${OPENSSL_INCLUDE_DIR})
set(plModifier_SOURCES
plAnimEventModifier.cpp

View File

@ -4,8 +4,6 @@ include_directories("../../NucleusLib/inc")
include_directories("../../NucleusLib")
include_directories("../../PubUtilLib")
include_directories(${OPENSSL_INCLUDE_DIR})
set(plNetClient_SOURCES
plLinkEffectsMgr.cpp
plNetCliAgeJoiner.cpp

View File

@ -4,8 +4,6 @@ include_directories("../../NucleusLib/inc")
include_directories("../../NucleusLib")
include_directories("../../PubUtilLib")
include_directories(${OPENSSL_INCLUDE_DIR})
set(plNetClientComm_SOURCES
plNetClientComm.cpp
)

View File

@ -3,8 +3,6 @@ include_directories("../../NucleusLib/inc")
include_directories("../../NucleusLib")
include_directories("../../PubUtilLib")
include_directories(${OPENSSL_INCLUDE_DIR})
set(plNetTransport_SOURCES
plNetTransport.cpp
plNetTransportMember.cpp

View File

@ -4,7 +4,6 @@ include_directories("../../NucleusLib")
include_directories("../../PubUtilLib")
include_directories(${PHYSX_INCLUDE_DIRS})
include_directories(${OPENSSL_INCLUDE_DIR})
set(plPhysX_SOURCES
plLOSDispatch.cpp

View File

@ -9019,7 +9019,10 @@ hsBool plDXPipeline::TestVisibleWorld( const hsBounds3Ext& wBnd )
{
if( fView.fCullTreeDirty )
IRefreshCullTree();
return fView.fCullTree.BoundsVisible(wBnd);
if (wBnd.GetType() == kBoundsNormal)
return fView.fCullTree.BoundsVisible(wBnd);
else
return false;
}
hsBool plDXPipeline::TestVisibleWorld( const plSceneObject* sObj )

View File

@ -2,15 +2,9 @@
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#define IDC_STATIC (-1) // all static controls
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
@ -77,7 +71,6 @@ END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END

View File

@ -3,8 +3,6 @@ include_directories("../../NucleusLib/inc")
include_directories("../../NucleusLib")
include_directories("../../PubUtilLib")
include_directories(${OPENSSL_INCLUDE_DIR})
set(plStatGather_SOURCES
plAutoProfile.cpp
plCalculatedProfiles.cpp