summaryrefslogtreecommitdiff
path: root/libs/ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2007-02-26 21:29:50 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2007-02-26 21:29:50 +0000
commit111c1b1d5e8276d348854cae1e3f9b0b6f52236d (patch)
tree24cd1cd6d2fa4a16b73c8e53b34e3c8ba53f3ddc /libs/ardour
parenta793f76fbeb04a4dbff84e7f3ce941265e731d88 (diff)
fix a couple uninitialized variable messages
git-svn-id: svn://localhost/ardour2/trunk@1516 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour')
-rw-r--r--libs/ardour/audio_diskstream.cc5
-rw-r--r--libs/ardour/reverse.cc11
2 files changed, 9 insertions, 7 deletions
diff --git a/libs/ardour/audio_diskstream.cc b/libs/ardour/audio_diskstream.cc
index 48f3771019..f0316894e2 100644
--- a/libs/ardour/audio_diskstream.cc
+++ b/libs/ardour/audio_diskstream.cc
@@ -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);
diff --git a/libs/ardour/reverse.cc b/libs/ardour/reverse.cc
index e0cc5d95fb..fc58e161aa 100644
--- a/libs/ardour/reverse.cc
+++ b/libs/ardour/reverse.cc
@@ -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) {