diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2018-12-27 13:57:43 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2018-12-27 13:57:43 +0100 |
commit | 5864285c0b987f97b632d1acfcc7cc49439e985d (patch) | |
tree | 98b0647f856131b1889aeed86bd7c421fd1a21a9 /src/soundplayer.h | |
parent | 55e4e6a951ca2b5bb23cdc600c6661e76c70a50a (diff) |
Add audio cache for the resampled/channel expanded sounds.
Diffstat (limited to 'src/soundplayer.h')
-rw-r--r-- | src/soundplayer.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/soundplayer.h b/src/soundplayer.h index 8502e6e..d8ba929 100644 --- a/src/soundplayer.h +++ b/src/soundplayer.h @@ -31,13 +31,16 @@ #include <QString> #include <QList> #include <QMutex> +#include <QMap> + +#include <cstdlib> class QueueItem { public: float *samples; - size_t pos; - size_t size; + std::size_t pos; + std::size_t size; }; class SoundPlayer @@ -57,4 +60,12 @@ private: QList<QueueItem> queue; QList<QueueItem> active; + + struct Samples + { + float *data; + std::size_t size; + }; + Samples getSampleData(QString file); + QMap<QString, Samples> cache; }; |