Initial work to make the AudioProcessor own the AudioThumbNail etc

This commit is contained in:
xenakios
2018-01-17 18:57:56 +02:00
parent 01ee930174
commit daf17f2ea3
4 changed files with 27 additions and 14 deletions

View File

@ -82,7 +82,7 @@ public:
class WaveformComponent : public Component, public ChangeListener, public Timer
{
public:
WaveformComponent(AudioFormatManager* afm);
WaveformComponent(AudioFormatManager* afm, AudioThumbnail* thumb);
~WaveformComponent();
void changeListenerCallback(ChangeBroadcaster* cb) override;
void paint(Graphics& g) override;
@ -108,9 +108,7 @@ public:
Value ShowFileCacheRange;
void setRecordingPosition(double pos) { m_rec_pos = pos; }
private:
SharedResourcePointer<MyThumbCache> m_thumbcache;
std::unique_ptr<AudioThumbnail> m_thumb;
AudioThumbnail* m_thumbnail = nullptr;
Range<double> m_view_range{ 0.0,1.0 };
int m_time_sel_drag_target = 0;
double m_time_sel_start = -1.0;