r956: README.BUILD - add more library recommendations
[cinelerra_cv/ct.git] / cinelerra / wavecache.h
blob2ff104e2a5a3aeb9442d7fccbf6ef696e48bbbfd
1 #ifndef WAVECACHE_H
2 #define WAVECACHE_H
6 // Store audio waveform fragments for drawing.
7 #include "cachebase.h"
10 class WaveCacheItem : public CacheItemBase
12 public:
13 WaveCacheItem();
14 ~WaveCacheItem();
16 int get_size();
18 int channel;
19 // End sample in asset samplerate. Starting point is CacheItemBase::position
20 int64_t end;
21 double high;
22 double low;
29 class WaveCache : public CacheBase
31 public:
32 WaveCache();
33 ~WaveCache();
35 // Returns the first item on or after the start argument or 0 if none found.
36 WaveCacheItem* get_wave(int asset_id,
37 int channel,
38 int64_t start,
39 int64_t end);
40 // Put waveform segment into cache
41 void put_wave(Asset *asset,
42 int channel,
43 int64_t start,
44 int64_t end,
45 double high,
46 double low);
51 #endif