[Openal] Switched from OpenAL to OpenAL Soft.. lost sound effects. 2

bencelot bencelot at gmail.com
Tue Oct 14 04:03:18 PDT 2008


All sounds are loaded only once, when the game starts up. Also, all sounds
are mono.


Here's how I'm setting it up:


  alutInit(0, NULL);

  int error = alGetError();
  if (error != AL_NO_ERROR)
  {
    cout << "INIT ERROR: " <<error << endl;
  }

  alListener3f(AL_VELOCITY,0,0,0);
  ALfloat oriValues[] = {0,0,-1 ,0,1,0};
  alListenerfv(AL_ORIENTATION, oriValues);

  alDistanceModel(AL_INVERSE_DISTANCE);

  error = alGetError();
  if (error != AL_NO_ERROR)
  {
    cout << "DISTANCE MODEL ERROR: " <<error << endl;
  }


And here's me creating my sources:

  //CREATING SOURCES
  maxSounds = 32;

  for(int i = 0; i < maxSounds; i++) {
    //LIFE SOUNDS
    ALuint tempSource;
    alGenSources(1, &tempSource);
    alSourcei(tempSource, AL_BUFFER, step1);
    alSourcei(tempSource, AL_SOURCE_RELATIVE, AL_TRUE);
    alSource3f(tempSource, AL_VELOCITY, 0,0,0);
    alSource3f(tempSource, AL_DIRECTION, 0,0,0);
    alSourcef(tempSource, AL_MAX_DISTANCE, 1500);
    alSourcef(tempSource, AL_ROLLOFF_FACTOR, 0.01);
    alSourcef(tempSource, AL_REFERENCE_DISTANCE, 32);


    sources.push_back(tempSource);
  }


  //Error checking
  int error = alGetError();
  if (error != AL_NO_ERROR)
  {
    cout << "LOADING SOURCES ERROR: " << error << endl;
  }




Now.. I don't get any errors at all when doing this. Remember, this all
works perfectly (on XP) when I use the old openal32.dll. But as soon as I
switch to the openal soft dll, it stops. I was under the impression that the
code should all work the same?
-- 
View this message in context: http://www.nabble.com/Switched-from-OpenAL-to-OpenAL-Soft..-lost-sound-effects.-2-tp19965590p19971318.html
Sent from the OpenAL - User mailing list archive at Nabble.com.



More information about the Openal mailing list