Changed: #1030 Implement music streaming in OpenAL driver

This commit is contained in:
kervala 2010-07-27 17:53:08 +02:00
parent 636b7be57b
commit 982136e0d2
2 changed files with 6 additions and 4 deletions

View file

@ -20,10 +20,11 @@
using namespace NLMISC; using namespace NLMISC;
namespace NLSOUND { namespace NLSOUND
{
CBufferAL::CBufferAL(ALuint buffername) : 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) _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_MONO16: sampleFormat = Mono16; break;
case AL_FORMAT_STEREO8: sampleFormat = Stereo8; break; case AL_FORMAT_STEREO8: sampleFormat = Stereo8; break;
case AL_FORMAT_STEREO16: sampleFormat = Stereo16; break; case AL_FORMAT_STEREO16: sampleFormat = Stereo16; break;
default: sampleFormat = (TSampleFormat)~0; nlstop; default: sampleFormat = SampleFormatUnknown;
} }
sampleFormatToBufferFormat(sampleFormat, format, channels, bitsPerSample); sampleFormatToBufferFormat(sampleFormat, format, channels, bitsPerSample);
frequency = _Frequency; frequency = _Frequency;

View file

@ -19,7 +19,8 @@
#include <nel/sound/driver/buffer.h> #include <nel/sound/driver/buffer.h>
namespace NLSOUND { namespace NLSOUND
{
/** /**
* OpenAL buffer * OpenAL buffer