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/buffers.h1
-rw-r--r--src/audio/sources.cc19
-rw-r--r--src/audio/sources.h1
4 files changed, 5 insertions, 21 deletions
diff --git a/src/audio/buffers.cc b/src/audio/buffers.cc
index df47d2a..774639e 100644
--- a/src/audio/buffers.cc
+++ b/src/audio/buffers.cc
@@ -50,11 +50,6 @@ void Buffers::clear()
index = 0;
}
-void Buffers::reset()
-{
- //shutdown();
- //init();
-}
size_t Buffers::load(std::string name)
{
diff --git a/src/audio/buffers.h b/src/audio/buffers.h
index 462afff..cc7a6c8 100644
--- a/src/audio/buffers.h
+++ b/src/audio/buffers.h
@@ -23,7 +23,6 @@ class Buffers {
public:
static void init();
static void shutdown();
- static void reset();
/// find previously loaded PCM data
static size_t find(std::string name);
diff --git a/src/audio/sources.cc b/src/audio/sources.cc
index 01fbafb..2ec0e26 100644
--- a/src/audio/sources.cc
+++ b/src/audio/sources.cc
@@ -40,6 +40,11 @@ void Sources::init()
void Sources::shutdown()
{
+ // stop all sources
+ for (size_t index= 0; index < MAXSOURCES; index++) {
+ alSourceRewind(sources[index]);
+ }
+
alDeleteSources(MAXSOURCES, sources);
clear();
}
@@ -52,20 +57,6 @@ void Sources::clear()
for (size_t i=0; i < MAXSOURCES; i++) {
source_available[i] = false;
}
-
-}
-
-void Sources::reset()
-{
- for (size_t index= 0; index < MAXSOURCES; index++) {
- source_available[index] = true;
- alSourceRewind(sources[index]);
- }
-
- // reserve ui sound sources
- for (size_t i=0; i < MAXUISOURCES; i++) {
- source_available[i] = false;
- }
}
size_t Sources::get()
diff --git a/src/audio/sources.h b/src/audio/sources.h
index f01e7a4..078c424 100644
--- a/src/audio/sources.h
+++ b/src/audio/sources.h
@@ -23,7 +23,6 @@ class Sources {
public:
static void init();
static void shutdown();
- static void reset();
static inline bool available(size_t index) { return source_available[index]; }