diff options
author | Stijn Buys <ingar@osirion.org> | 2008-10-16 16:34:15 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-10-16 16:34:15 +0000 |
commit | 1a28393dabf4f4696bf433ddde52e7a25253c955 (patch) | |
tree | 4d4fa4034f30fc882a78ab6ea148a32e83b9e88c /src/audio/audio.cc | |
parent | 1e0df536c2fae85c317ce9c3cc17603d5f98c911 (diff) |
various user interface related updates
Diffstat (limited to 'src/audio/audio.cc')
-rw-r--r-- | src/audio/audio.cc | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/audio/audio.cc b/src/audio/audio.cc index 81a260c..ca30590 100644 --- a/src/audio/audio.cc +++ b/src/audio/audio.cc @@ -18,13 +18,13 @@ ALCcontext *audio_context = 0; void init() { - con_print << "^BInitializing audio..."; + con_print << "^BInitializing audio..." << std::endl; // open the default audio device audio_device = alcOpenDevice(0); if (!audio_device) { - con_warn << "Could not initialize audio!"; + con_warn << "Could not initialize audio!" << std::endl; return; } @@ -34,7 +34,7 @@ void init() if (!audio_context) { alcCloseDevice(audio_device); audio_device = 0; - con_warn << "Could not create audio context!"; + con_warn << "Could not create audio context!" << std::endl; return; } @@ -56,6 +56,17 @@ void init() load("ui/console"); } +void reset() +{ + con_print << "^BReloading audio..." << std::endl; + + Sources::reset(); + Buffers::reset(); + + load("ui/nosnd"); + load("ui/console"); +} + void load (const char *name) { Buffers::load(std::string(name)); @@ -63,7 +74,7 @@ void load (const char *name) void shutdown() { - con_print << "^BShutting down audio..."; + con_print << "^BShutting down audio..." << std::endl; Sources::shutdown(); |