dungeon_crawler
diff prototype/src/audio/sample.h @ 48:aa9e28670ae2
added sound playback, more to do
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Mon, 17 Sep 2012 08:40:59 +0300 |
parents | d52711f2b9a1 |
children |
line diff
1.1 --- a/prototype/src/audio/sample.h Sun Sep 16 08:16:50 2012 +0300 1.2 +++ b/prototype/src/audio/sample.h Mon Sep 17 08:40:59 2012 +0300 1.3 @@ -1,6 +1,8 @@ 1.4 #ifndef SAMPLE_H_ 1.5 #define SAMPLE_H_ 1.6 1.7 +#include "dataset.h" 1.8 + 1.9 class AudioSample { 1.10 private: 1.11 unsigned int albuffer; 1.12 @@ -12,6 +14,13 @@ 1.13 ~AudioSample(); 1.14 1.15 bool load(const char *fname); 1.16 + 1.17 + friend class AudioSource; 1.18 }; 1.19 1.20 +typedef DataSet<AudioSample*> SampleSet; 1.21 + 1.22 +AudioSample *load_audio_sample(const char *fname); 1.23 +void destroy_audio_sample(AudioSample *s); 1.24 + 1.25 #endif // SAMPLE_H_