[Openal] xfi issues

Xavier Bouchoux xavier at nadeo.com
Tue Aug 28 05:10:32 PDT 2007


> oups. the buffer for the source has changed to some buffer I've never 
> created.
> Is this excepted? can the buffer be changed at any time?
> If so, should I just ignore the buffer I didn't create, or should I 
> delete it when I delete the source?
> 

just to make sure it wasn't something special I was doing somewhere else 
in the code (efx, preallocing sources, ...)
I modified the simple "PlayStatic.cpp" example:

@@ -59,6 +59,10 @@
	// Attach Source to Buffer
  	alSourcei( uiSource, AL_BUFFER, uiBuffer );

+	ALint iCurBuffer;
+	alGetSourcei(uiSource, AL_BUFFER, &iCurBuffer);
+	ALFWprintf("before, buf = %d\n", iCurBuffer);
+
  	// Play Source
      alSourcePlay( uiSource );
  	ALFWprintf("Playing Source ");
@@ -72,6 +76,9 @@
  	} while (iState == AL_PLAYING);

  	ALFWprintf("\n");
+
+	alGetSourcei(uiSource, AL_BUFFER, &iCurBuffer);
+	ALFWprintf("after, buf = %d\n", iCurBuffer);

  	// Clean up by deleting Source(s) and Buffer(s)
  	alSourceStop(uiSource);


And I do reproduce the same issue,
before = 1,  after = 4096

(whereas if on the same machine I chose "generic software", before and 
after have the same values)




More information about the Openal mailing list