don't (re)create disk reader/writer if they already exist
This commit is contained in:
parent
6038ef44f9
commit
9d355f1390
@ -126,14 +126,17 @@ Track::add_processors_oh_children_of_mine ()
|
||||
} else if (_mode == NonLayered){
|
||||
dflags = DiskIOProcessor::Flag(dflags | DiskIOProcessor::NonLayered);
|
||||
}
|
||||
|
||||
if (!_disk_reader) {
|
||||
_disk_reader.reset (new DiskReader (_session, name(), dflags));
|
||||
_disk_reader->set_block_size (_session.get_block_size ());
|
||||
_disk_reader->set_route (boost::dynamic_pointer_cast<Route> (shared_from_this()));
|
||||
}
|
||||
|
||||
if (!_disk_writer) {
|
||||
_disk_writer.reset (new DiskWriter (_session, name(), dflags));
|
||||
_disk_writer->set_block_size (_session.get_block_size ());
|
||||
_disk_writer->set_route (boost::dynamic_pointer_cast<Route> (shared_from_this()));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user