AudioPlaylistSource::AudioPlaylistSource (Session& s, const ID& orig, const std::string& name, boost::shared_ptr<AudioPlaylist> p,
uint32_t chn, frameoffset_t begin, framecnt_t len, Source::Flag flags)
: Source (s, DataType::AUDIO, name)
- , AudioSource (s, name)
, PlaylistSource (s, orig, name, p, DataType::AUDIO, begin, len, flags)
+ , AudioSource (s, name)
, _playlist_channel (chn)
{
AudioSource::_length = len;
AudioPlaylistSource::AudioPlaylistSource (Session& s, const XMLNode& node)
: Source (s, node)
- , AudioSource (s, node)
, PlaylistSource (s, node)
+ , AudioSource (s, node)
{
/* PlaylistSources are never writable, renameable, removable or destructive */
_flags = Flag (_flags & ~(Writable|CanRename|Removable|RemovableIfEmpty|RemoveAtDestroy|Destructive));
return node;
}
-
int
AudioPlaylistSource::set_state (const XMLNode& node, int version)
{
if (with_descendants) {
if (Source::set_state (node, version) ||
- AudioSource::set_state (node, version) ||
- PlaylistSource::set_state (node, version)) {
+ PlaylistSource::set_state (node, version) ||
+ AudioSource::set_state (node, version)) {
return -1;
}
}
framecnt_t
AudioPlaylistSource::read_unlocked (Sample* dst, framepos_t start, framecnt_t cnt) const
{
- Sample* sbuf;
- gain_t* gbuf;
+ boost::shared_ptr<Sample> sbuf;
+ boost::shared_ptr<gain_t> gbuf;
framecnt_t to_read;
framecnt_t to_zero;
pair<framepos_t,framepos_t> extent = _playlist->get_extent();
gbuf = _gain_buffers[_level-1];
}
- boost::dynamic_pointer_cast<AudioPlaylist>(_playlist)->read (dst, sbuf, gbuf, start+_playlist_offset, to_read, _playlist_channel);
+ boost::dynamic_pointer_cast<AudioPlaylist>(_playlist)->read (dst, sbuf.get(), gbuf.get(), start+_playlist_offset, to_read, _playlist_channel);
if (to_zero) {
memset (dst+to_read, 0, sizeof (Sample) * to_zero);
return _peak_path;
}
+