diff options
Diffstat (limited to 'src/audio/buffers.cc')
-rw-r--r-- | src/audio/buffers.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/audio/buffers.cc b/src/audio/buffers.cc index 7bf7eb1..4349e8f 100644 --- a/src/audio/buffers.cc +++ b/src/audio/buffers.cc @@ -1,11 +1,12 @@ /* - audio/buffers.h + audio/buffers.cc This file is part of the Osirion project and is distributed under the terms of the GNU General Public License version 2 */ #include <string.h> +#include "audio/audio.h" #include "audio/buffers.h" #include "audio/pcm.h" #include "audio/wav.h" @@ -59,6 +60,12 @@ size_t Buffers::load(std::string name) if (it != registry.end()) return (*it).second; + // check if the audio subsystem has been initialized + if (!initialized()) { + registry[name] = 0; + return 0; + } + // load wav file PCM *pcm = Wav::load(name); if (!pcm) { |