diff --git a/code/nel/include/nel/sound/driver/buffer.h b/code/nel/include/nel/sound/driver/buffer.h index 5d488f1c7..27a8d9f00 100644 --- a/code/nel/include/nel/sound/driver/buffer.h +++ b/code/nel/include/nel/sound/driver/buffer.h @@ -48,6 +48,8 @@ public: /// Intel/DVI ADPCM format, only available for 1 channel at 16 bits per sample, encoded at 4 bits per sample. /// This is only implemented in the DSound and XAudio2 driver. FormatDviAdpcm = 11, + /// No format set. Used when a TBufferFormat value has not been set to any value yet. + FormatNotSet = (~0), }; /// The storage mode of this buffer. Also controls the X-RAM extension of OpenAL. enum TStorageMode diff --git a/code/nel/src/sound/driver/xaudio2/source_xaudio2.cpp b/code/nel/src/sound/driver/xaudio2/source_xaudio2.cpp index df8101b40..7ee723787 100644 --- a/code/nel/src/sound/driver/xaudio2/source_xaudio2.cpp +++ b/code/nel/src/sound/driver/xaudio2/source_xaudio2.cpp @@ -121,8 +121,7 @@ void CSourceXAudio2::commit3DChanges() { nlassert(_SourceVoice); - // Only mono buffers get 3d sound, multi-channel buffers go directly to the speakers (calculate rolloff too!!). - // Todo: stereo buffers calculate distance ? + // Only mono buffers get 3d sound, multi-channel buffers go directly to the speakers without any distance rolloff. if (_Channels > 1) { // _SoundDriver->getDSPSettings()->DstChannelCount = 1; @@ -535,7 +534,7 @@ bool CSourceXAudio2::preparePlay(IBuffer::TBufferFormat bufferFormat, uint8 chan // destroy adpcm utility (if it exists) delete _AdpcmUtility; _AdpcmUtility = NULL; // reset current stuff - _Format = (IBuffer::TBufferFormat)~0; + _Format = IBuffer::FormatNotSet; _Channels = 0; _BitsPerSample = 0; }