View | Details | Raw Unified
Collapse All | Expand All

(-) file_not_specified_in_diff (-39 / +4 lines)
 Lines 3946-3952    Link Here 
	if test x"$use_static_openal" = x"yes"; then
	if test x"$use_static_openal" = x"yes"; then
		LIBS="$LIBS /usr/local/lib/libopenal.a"
		LIBS="$LIBS /usr/local/lib/libopenal.a"
	else
	else
		LIBS="$LIBS `$OPENAL_CONFIG --libs`"
		LIBS="$LIBS `$OPENAL_CONFIG --libs` -lalut"
	fi
	fi
	CFLAGS="$CFLAGS `$OPENAL_CONFIG --cflags`"
	CFLAGS="$CFLAGS `$OPENAL_CONFIG --cflags`"
 Lines 57-100    Link Here 
	SoundBuffer(fileName),
	SoundBuffer(fileName),
	buffer_(0)
	buffer_(0)
{
{
	unsigned int error;
	if ((buffer_ = alutCreateBufferFromFile(fileName)) == AL_NONE)
	// Create a buffer
	alGetError();
	alGenBuffers(1, &buffer_);
	if ((error = alGetError()) != AL_NO_ERROR)
	{
		return;
	}
	// Load WAV
	void *data;
	ALenum format;
	ALsizei size;
	ALsizei freq;
	ALboolean loop;
#ifdef __DARWIN__
	alutLoadWAVFile((ALbyte*) fileName,&format,&data,&size,&freq);
#else
	alutLoadWAVFile((ALbyte*) fileName,&format,&data,&size,&freq,&loop);
#endif
	if ((error = alGetError()) != AL_NO_ERROR)
	{
		return;
	}
	// Load WAV into buffer
	alBufferData(buffer_,format,data,size,freq);
	if ((error = alGetError()) != AL_NO_ERROR)
	{
		return;
	}
	// Delete WAV memory
	alutUnloadWAV(format,data,size,freq);
	if ((error = alGetError()) != AL_NO_ERROR)
	{
	{
		return;
		return;
	}
	}
 Lines 28-33    Link Here 
#include <sound/PlayingSoundSource.h>
#include <sound/PlayingSoundSource.h>
#include <AL/al.h>
#include <AL/al.h>
#include <AL/alc.h>
#include <AL/alc.h>
#include <AL/alut.h>
#include <algorithm>
#include <algorithm>
Sound *Sound::instance_ = 0;
Sound *Sound::instance_ = 0;
 Lines 150-155    Link Here 
		totalSources_.push_back(source);
		totalSources_.push_back(source);
		availableSources_.push_back(source);
		availableSources_.push_back(source);
	}
	}
	alutInitWithoutContext(NULL, NULL);
	init_ = true;
	init_ = true;
	return init_;
	return init_;