fix a couple uninitialized variable messages
git-svn-id: svn://localhost/ardour2/trunk@1516 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
@@ -1305,6 +1305,11 @@ AudioDiskstream::do_flush (Session::RunContext context, bool force_flush)
|
||||
|
||||
_write_data_count = 0;
|
||||
|
||||
transvec.buf[0] = 0;
|
||||
transvec.buf[1] = 0;
|
||||
vector.buf[0] = 0;
|
||||
vector.buf[1] = 0;
|
||||
|
||||
for (ChannelList::iterator chan = channels.begin(); chan != channels.end(); ++chan) {
|
||||
|
||||
(*chan).capture_buf->get_read_vector (&vector);
|
||||
|
||||
@@ -47,7 +47,7 @@ Reverse::run (boost::shared_ptr<AudioRegion> region)
|
||||
SourceList nsrcs;
|
||||
SourceList::iterator si;
|
||||
nframes_t blocksize = 256 * 1024;
|
||||
Sample* buf;
|
||||
Sample* buf = 0;
|
||||
nframes_t fpos;
|
||||
nframes_t fstart;
|
||||
nframes_t to_read;
|
||||
@@ -69,8 +69,6 @@ Reverse::run (boost::shared_ptr<AudioRegion> region)
|
||||
buf = new Sample[blocksize];
|
||||
to_read = blocksize;
|
||||
|
||||
cerr << "Reverse " << region->name() << " len = " << region->length() << " blocksize = " << blocksize << " start at " << fstart << endl;
|
||||
|
||||
/* now read it backwards */
|
||||
|
||||
while (to_read) {
|
||||
@@ -80,8 +78,6 @@ Reverse::run (boost::shared_ptr<AudioRegion> region)
|
||||
for (n = 0, si = nsrcs.begin(); n < region->n_channels(); ++n, ++si) {
|
||||
|
||||
/* read it in */
|
||||
|
||||
cerr << "read at " << fpos << " for " << to_read << endl;
|
||||
|
||||
if (region->source (n)->read (buf, fpos, to_read) != to_read) {
|
||||
goto out;
|
||||
@@ -105,7 +101,6 @@ Reverse::run (boost::shared_ptr<AudioRegion> region)
|
||||
to_read = blocksize;
|
||||
} else {
|
||||
to_read = fpos - fstart;
|
||||
cerr << "Last read detected, only " << fpos - fstart << " left; move to start and read " << to_read << endl;
|
||||
fpos = fstart;
|
||||
}
|
||||
};
|
||||
@@ -114,7 +109,9 @@ Reverse::run (boost::shared_ptr<AudioRegion> region)
|
||||
|
||||
out:
|
||||
|
||||
delete [] buf;
|
||||
if (buf) {
|
||||
delete [] buf;
|
||||
}
|
||||
|
||||
if (ret) {
|
||||
for (si = nsrcs.begin(); si != nsrcs.end(); ++si) {
|
||||
|
||||
Reference in New Issue
Block a user