mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-21 00:18:43 +00:00
Added: FormatNotSet value for TBufferFormat
--HG-- branch : sound_dev
This commit is contained in:
parent
b2971ffc0c
commit
57411c0a7b
2 changed files with 4 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue