diff options
Diffstat (limited to 'src/audiofile.cc')
-rw-r--r-- | src/audiofile.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/audiofile.cc b/src/audiofile.cc index 3f0bd82..5a9cdb5 100644 --- a/src/audiofile.cc +++ b/src/audiofile.cc @@ -42,15 +42,23 @@ AudioFile::AudioFile(std::string filename) data = NULL; size = 0; + magic = this; + //load(); } AudioFile::~AudioFile() { + magic = NULL; //printf("delete AudioFile %p\n", this); unload(); } +bool AudioFile::isValid() +{ + return this == magic; +} + void AudioFile::unload() { if(data) { |