diff options
author | Stijn Buys <ingar@osirion.org> | 2008-07-31 14:05:28 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-07-31 14:05:28 +0000 |
commit | 96521495f8c0070537be42c97f8fcbe55ec3990f (patch) | |
tree | 95f73fa059c49ee71510e90a93f344ce46731148 /src/audio | |
parent | 32317145166988e5f9c65395bfc027aa2d32ed0e (diff) |
most love valgrind
Diffstat (limited to 'src/audio')
-rw-r--r-- | src/audio/buffers.cc | 2 | ||||
-rw-r--r-- | src/audio/pcm.cc | 13 | ||||
-rw-r--r-- | src/audio/pcm.h | 5 |
3 files changed, 2 insertions, 18 deletions
diff --git a/src/audio/buffers.cc b/src/audio/buffers.cc index dd83000..4e26c33 100644 --- a/src/audio/buffers.cc +++ b/src/audio/buffers.cc @@ -87,6 +87,8 @@ size_t Buffers::load(std::string name) registry[name] = id; index++; + delete pcm; + return id; } diff --git a/src/audio/pcm.cc b/src/audio/pcm.cc index b485199..7a3f767 100644 --- a/src/audio/pcm.cc +++ b/src/audio/pcm.cc @@ -33,17 +33,4 @@ void PCM::clear() memset(pcm_data, 0, pcm_size); } -void PCM::load(const char *name) -{ - PCM *pcm = Wav::load(name); - if (pcm) { - delete pcm; - } -} - -void PCM::load(std::string const & name) -{ - load(name.c_str()); -} - } diff --git a/src/audio/pcm.h b/src/audio/pcm.h index 740a23c..dc8eb16 100644 --- a/src/audio/pcm.h +++ b/src/audio/pcm.h @@ -38,11 +38,6 @@ public: /// number of channels inline unsigned int channels() const { return pcm_channels; } - /// load PCM audio data from file - static void load(std::string const & name); - - static void load(const char *name); - private: unsigned char *pcm_data; |