Author Topic: problems to load a 3D sample...  (Read 2888 times)

Pachu

  • Guest
problems to load a 3D sample...
« on: 16 May '03 - 21:33 »
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"

Code: [Select]
_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:

Code: [Select]
_soundStream[ _numSamples ].stream = BASS_SampleLoad( FALSE, ( void* ) fileName, 0, 0, 4, 0 );

My init:
Code: [Select]
BASS_Init( -1, quality, BASS_DEVICE_3D, GetForegroundWindow( ) )

the function:
Code: [Select]

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

  • Administrator
  • Posts: 26222
Re: problems to load a 3D sample...
« Reply #1 on: 17 May '03 - 16:27 »
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

  • Posts: 5
Re: problems to load a 3D sample...
« Reply #2 on: 18 May '03 - 15:56 »
Thank You! the problem was that the sample is STEREO!

Now, everything runs perfect! :D bye