problems to load a 3D sample...

Started by Pachu,

Pachu

Hi! first, sorry with my english...

I've problems to load 3D samples... the problem is the function BASS_SampleLoad. With the flag BASS_SAMPLE_3D, bass return an error --> -1 "some other mystery error"

_soundStream[ _numSamples ].stream = BASS_SampleLoad( FALSE, ( void* ) fileName, 0, 0, 4, BASS_SAMPLE_3D | BASS_SAMPLE_MUTEMAX );
But, with that line everything it's correct:

_soundStream[ _numSamples ].stream = BASS_SampleLoad( FALSE, ( void* ) fileName, 0, 0, 4, 0 );
My init: BASS_Init( -1, quality, BASS_DEVICE_3D, GetForegroundWindow( ) )
the function:
int SoundManager::loadSample3D( const char *fileName ) {


      assert( _numSamples < _maxSamples ); //Error si hay más samples de los soportados en el array

      _soundStream[ _numSamples ].stream = BASS_SampleLoad( FALSE, ( void* ) fileName, 0, 0, 4, BASS_SAMPLE_3D | BASS_SAMPLE_MUTEMAX );

      if( int error = BASS_ErrorGetCode( ) ) {
      
            MessageBox( NULL, "No existe el Sample 3D!", "Error!", MB_OK | MB_ICONSTOP );
      }

      sampleGetInfo( _soundStream[ _numSamples ].stream, _sampleInfo );
      
      sampleSetInfo( _soundStream[ _numSamples ].stream, _sampleInfo, 0, 5.0, 50.0, 360, 360, 100 );
      
      ++_numSamples;
      
      return _numSamples - 1; //devuelve el índice
}

Help me! please. bye

Ian @ un4seen

Are the samples mono? 3D samples must be mono.

If that's not the problem, can you load them in the precompiled 3DTEST.EXE example?

Pachu

Thank You! the problem was that the sample is STEREO!

Now, everything runs perfect! :D bye