Mercurial > hg > svcore
changeset 1828:618326c4ce4b audio-source-refactor
Use a shared_ptr
author | Chris Cannam |
---|---|
date | Thu, 19 Mar 2020 16:09:55 +0000 |
parents | 6e218407f0cf |
children | 51fd27fbce9a |
files | base/AudioPlaySource.h |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/base/AudioPlaySource.h Thu Mar 19 16:09:04 2020 +0000 +++ b/base/AudioPlaySource.h Thu Mar 19 16:09:55 2020 +0000 @@ -18,6 +18,8 @@ #include "BaseTypes.h" +#include <memory> + struct Auditionable { virtual ~Auditionable() { } }; @@ -101,9 +103,11 @@ /** * Set a plugin or other subclass of Auditionable as an - * auditioning effect. + * auditioning effect. The Auditionable is shared with the caller: + * the expectation is that the caller may continue to modify its + * parameters etc during auditioning. */ - virtual void setAuditioningEffect(Auditionable *) = 0; + virtual void setAuditioningEffect(std::shared_ptr<Auditionable>) = 0; };