From 5950b1f5bf3f6174f5efab26617bf9253e2eb776 Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 27 Jul 2010 17:53:08 +0200 Subject: [PATCH] Changed: #1030 Implement music streaming in OpenAL driver --- code/nel/src/sound/driver/openal/buffer_al.cpp | 7 ++++--- code/nel/src/sound/driver/openal/buffer_al.h | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/code/nel/src/sound/driver/openal/buffer_al.cpp b/code/nel/src/sound/driver/openal/buffer_al.cpp index f9c37e3f3..1d2967a4f 100644 --- a/code/nel/src/sound/driver/openal/buffer_al.cpp +++ b/code/nel/src/sound/driver/openal/buffer_al.cpp @@ -20,10 +20,11 @@ using namespace NLMISC; -namespace NLSOUND { +namespace NLSOUND +{ CBufferAL::CBufferAL(ALuint buffername) : - IBuffer(), _BufferName(buffername), _SampleFormat(AL_INVALID), _Frequency(0), + IBuffer(), _BufferName(buffername), _Name(NULL), _SampleFormat(AL_INVALID), _Frequency(0), _DataAligned(NULL), _DataPtr(NULL), _Capacity(0), _Size(0), _StorageMode(IBuffer::StorageAuto), _IsLoaded(false) { @@ -176,7 +177,7 @@ void CBufferAL::getFormat(TBufferFormat &format, uint8 &channels, uint8 &bitsPer case AL_FORMAT_MONO16: sampleFormat = Mono16; break; case AL_FORMAT_STEREO8: sampleFormat = Stereo8; break; case AL_FORMAT_STEREO16: sampleFormat = Stereo16; break; - default: sampleFormat = (TSampleFormat)~0; nlstop; + default: sampleFormat = SampleFormatUnknown; } sampleFormatToBufferFormat(sampleFormat, format, channels, bitsPerSample); frequency = _Frequency; diff --git a/code/nel/src/sound/driver/openal/buffer_al.h b/code/nel/src/sound/driver/openal/buffer_al.h index c7cc5836b..766d0b20d 100644 --- a/code/nel/src/sound/driver/openal/buffer_al.h +++ b/code/nel/src/sound/driver/openal/buffer_al.h @@ -19,7 +19,8 @@ #include -namespace NLSOUND { +namespace NLSOUND +{ /** * OpenAL buffer