comparison base/AudioPlaySource.h @ 1828:618326c4ce4b audio-source-refactor

Use a shared_ptr
author Chris Cannam
date Thu, 19 Mar 2020 16:09:55 +0000
parents 8541563f1fd3
children
comparison
equal deleted inserted replaced
1827:6e218407f0cf 1828:618326c4ce4b
15 15
16 #ifndef SV_AUDIO_PLAY_SOURCE_H 16 #ifndef SV_AUDIO_PLAY_SOURCE_H
17 #define SV_AUDIO_PLAY_SOURCE_H 17 #define SV_AUDIO_PLAY_SOURCE_H
18 18
19 #include "BaseTypes.h" 19 #include "BaseTypes.h"
20
21 #include <memory>
20 22
21 struct Auditionable { 23 struct Auditionable {
22 virtual ~Auditionable() { } 24 virtual ~Auditionable() { }
23 }; 25 };
24 26
99 */ 101 */
100 virtual int getTargetChannelCount() const = 0; 102 virtual int getTargetChannelCount() const = 0;
101 103
102 /** 104 /**
103 * Set a plugin or other subclass of Auditionable as an 105 * Set a plugin or other subclass of Auditionable as an
104 * auditioning effect. 106 * auditioning effect. The Auditionable is shared with the caller:
107 * the expectation is that the caller may continue to modify its
108 * parameters etc during auditioning.
105 */ 109 */
106 virtual void setAuditioningEffect(Auditionable *) = 0; 110 virtual void setAuditioningEffect(std::shared_ptr<Auditionable>) = 0;
107 111
108 }; 112 };
109 113
110 #endif 114 #endif