• Advertisement
Sign in to follow this  

Problems with alDeleteBuffers in OpenAl - Solved

This topic is 4914 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Well the audio fourm here doesn't seem to get any traffic, so I'm posting here as I know a few people here use openAL. I'm triing to create a simple wrapper class for AL, the problem is when ever I call alDeleteBuffers it doesn't delete the buffer, alGetError() returns AL_ILLEGAL_COMMAND or AL_INVALID_OPERATION. If I try and then gen a buffer, my program will crash. I create the buffer with the following:
	ALenum format;
	ALsizei size;
	ALvoid* data;
	ALsizei freq;
	ALboolean loop;

	//Find a open buffer spot
	int bufferSlot = FindOpenBufferSlot();
	alGenBuffers(1, &bufferVector[bufferSlot].buffer);



I then delete it with:
		alDeleteBuffers(1, &bufferVector[nId].buffer);
		int errorNum = alGetError();
		if(errorNum != AL_NO_ERROR)
		{
			breakFunc();
		}
		bufferOpenQueue.push(nId);



I'm really at a loss, I've read all the documentation, searched the net, tried debugging for hours. No luck. I also have this problem when i run a tutorial I found, at the end where it deletes the buffers I added the check and it returns an error. If any one can help, or knows a place I could post AL questions, That would be great. EDIT - I figured it out, I have to delete all sources using that buffer (duh). [Edited by - skow on August 5, 2004 3:35:58 PM]

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement