[hash.c:395] failed read

Started by sthorsen, November 22, 2005, 09:08:59

Previous topic - Next topic

sthorsen

Hi! When running the following code I get the "[hash.c:395] failed read" a whole bunch of times on the error output stream. The code works fine (as far as I know). Any suggestions on how to get rid of the error messages?

public int loadALData() {
		// Load wav data into a buffer.
		AL10.alGenBuffers(buffer);

		if (AL10.alGetError() != AL10.AL_NO_ERROR)
			return AL10.AL_FALSE;

		WaveData waveFile = WaveData.create("openAL/FancyPants.wav");
		AL10.alBufferData(buffer.get(0), waveFile.format, waveFile.data,
				waveFile.samplerate);
		waveFile.dispose();
		// Bind the buffer with the source.

		AL10.alGenSources(source); // <------------------"[hash.c:395] failed read" comes from here

		if (AL10.alGetError() != AL10.AL_NO_ERROR)
			return AL10.AL_FALSE;

		sourcePos.rewind();
		sourceVel.rewind();
		AL10.alSourcei(source.get(0), AL10.AL_BUFFER, buffer.get(0));
		AL10.alSourcef(source.get(0), AL10.AL_PITCH, 1.0f);
		AL10.alSourcef(source.get(0), AL10.AL_GAIN, 1.0f);
		AL10.alSource(source.get(0), AL10.AL_POSITION, sourcePos);
		AL10.alSource(source.get(0), AL10.AL_VELOCITY, sourceVel);
		// Do another error check and return.
		if (AL10.alGetError() == AL10.AL_NO_ERROR)
			return AL10.AL_TRUE;

		return AL10.AL_FALSE;
	}