From a010f94390422eefa366a5f390c1f9e3ccc66fd5 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 24 May 2008 10:10:37 +0000 Subject: text_length functions, improved lighting, r_bbox draws bounding boxes --- src/audio/buffers.cc | 5 +++-- src/audio/sources.cc | 2 +- src/audio/sources.h | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) (limited to 'src/audio') diff --git a/src/audio/buffers.cc b/src/audio/buffers.cc index f7fbbb5..5ea1b05 100644 --- a/src/audio/buffers.cc +++ b/src/audio/buffers.cc @@ -23,7 +23,7 @@ void Buffers::init() alGenBuffers(MAXBUFFERS, buffers); if ((error = alGetError()) != AL_NO_ERROR) { - con_warn << "Error " << error << " initializing OpenAL buffers!" << std::endl; + con_warn << "Error " << std::hex << error << " initializing OpenAL buffers!" << std::endl; return; } } @@ -80,8 +80,9 @@ size_t Buffers::load(std::string name) size_t id = index; alBufferData(buffers[id], format, pcm->data(), pcm->size(), pcm->samplerate()); - if (alGetError()) + if (alGetError()!= AL_NO_ERROR) { con_warn << "Error loading PCM data " << name << std::endl; + } registry[name] = id; index++; diff --git a/src/audio/sources.cc b/src/audio/sources.cc index 90a79fa..209bc94 100644 --- a/src/audio/sources.cc +++ b/src/audio/sources.cc @@ -21,7 +21,7 @@ void Sources::init() alGenSources(MAXSOURCES, sources); if ((error = alGetError()) != AL_NO_ERROR) { - con_warn << "Error " << error << " initializing OpenAL sources!" << std::endl; + con_warn << "Error " << std::hex << error << " initializing OpenAL sources!" << std::endl; return; } source_available[0] = true; diff --git a/src/audio/sources.h b/src/audio/sources.h index 405b944..f3d6470 100644 --- a/src/audio/sources.h +++ b/src/audio/sources.h @@ -15,7 +15,7 @@ namespace audio { -const size_t MAXSOURCES = 128; +const size_t MAXSOURCES = 32; /// OpenAL sources wrapper class class Sources { -- cgit v1.2.3