Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/audio
diff options
context:
space:
mode:
Diffstat (limited to 'src/audio')
-rw-r--r--src/audio/buffers.cc5
-rw-r--r--src/audio/sources.cc2
-rw-r--r--src/audio/sources.h2
3 files changed, 5 insertions, 4 deletions
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 {