Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 132839 | Differences between
and this patch

Collapse All | Expand All

(-)file_not_specified_in_diff (-12 / +11 lines)
Line  Link Here
0
-- configure.ac
0
++ configure.ac
Lines 98-108 Link Here
98
	*)
98
	*)
99
	
99
	
100
	AX_FINDLIB([AUDIOLIB], [OpenAL], [OpenAL],
100
	AX_FINDLIB([AUDIOLIB], [OpenAL], [OpenAL],
101
		AX_LANG_PROGRAM([#include <AL/alut.h>], [alutInit(0,0);]),
101
		AX_LANG_PROGRAM([#include <AL/alc.h>], [alcOpenDevice(0);]),
102
		[], [-lopenal],
102
		[], [-lopenal],
103
		[],
103
		[],
104
		[AC_MSG_ERROR([Please install OpenAL])])
104
		[AC_MSG_ERROR([Please install OpenAL])])
105
	
105
	
106
	AX_FINDLIB([AUDIOLIB], [ALUT], [ALUT],
107
		AX_LANG_PROGRAM([#include <AL/alut.h>], [alutInit(0,0);]),
108
		[], [-lalut],
109
		[],
110
		[AC_MSG_ERROR([Please install ALUT])])
111
	
106
	;;
112
	;;
107
	
113
	
108
esac
114
esac
109
-- src/pengine/audio.cpp
115
++ src/pengine/audio.cpp
Lines 196-220 Link Here
196
	PHYSFS_read(pfile, wavbuffer, filesize, 1);
196
	PHYSFS_read(pfile, wavbuffer, filesize, 1);
197
	PHYSFS_close(pfile);
197
	PHYSFS_close(pfile);
198
	
198
	
199
	ALenum format;
200
	ALvoid *data = null;
201
	ALsizei size, freq;
202
	ALboolean loop;
203
	
199
	
204
	alutLoadWAVMemory((ALbyte *)wavbuffer, &format, &data, &size, &freq, &loop);
200
	buffer = alutCreateBufferFromFileImage(wavbuffer, filesize);
205
	
201
	
206
	delete [] wavbuffer;
202
	delete [] wavbuffer;
207
	
203
	
208
	if (!data) {
204
	if (buffer == AL_NONE) {
209
		unload();
205
		unload();
210
		throw MakePException ("Sample load failed");
206
		throw MakePException ("Sample load failed");
211
	}
207
	}
212
	
208
	
213
	alGenBuffers(1, &buffer);
214
	
209
	
215
	alBufferData(buffer, format, data, size, freq);
216
	
210
	
217
	alutUnloadWAV(format, data, size, freq);
218
}
211
}
219
212
220
void PAudioSample::unload()
213
void PAudioSample::unload()

Return to bug 132839