summaryrefslogtreecommitdiff
path: root/libs/ardour/audioregion.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/audioregion.cc')
-rw-r--r--libs/ardour/audioregion.cc120
1 files changed, 61 insertions, 59 deletions
diff --git a/libs/ardour/audioregion.cc b/libs/ardour/audioregion.cc
index cbf2e44c5f..271544297d 100644
--- a/libs/ardour/audioregion.cc
+++ b/libs/ardour/audioregion.cc
@@ -1024,65 +1024,67 @@ AudioRegion::read_raw_internal (Sample* buf, nframes_t pos, nframes_t cnt) const
int
AudioRegion::exportme (Session& session, ARDOUR::ExportSpecification& spec)
{
- const nframes_t blocksize = 4096;
- nframes_t to_read;
- int status = -1;
-
- spec.channels = _sources.size();
-
- if (spec.prepare (blocksize, session.frame_rate())) {
- goto out;
- }
-
- spec.pos = 0;
- spec.total_frames = _length;
-
- while (spec.pos < _length && !spec.stop) {
-
-
- /* step 1: interleave */
-
- to_read = min (_length - spec.pos, blocksize);
-
- if (spec.channels == 1) {
-
- if (read_raw_internal (spec.dataF, _start + spec.pos, to_read) != to_read) {
- goto out;
- }
-
- } else {
-
- Sample buf[blocksize];
-
- for (uint32_t chan = 0; chan < spec.channels; ++chan) {
-
- if (audio_source(chan)->read (buf, _start + spec.pos, to_read) != to_read) {
- goto out;
- }
-
- for (nframes_t x = 0; x < to_read; ++x) {
- spec.dataF[chan+(x*spec.channels)] = buf[x];
- }
- }
- }
-
- if (spec.process (to_read)) {
- goto out;
- }
-
- spec.pos += to_read;
- spec.progress = (double) spec.pos /_length;
-
- }
-
- status = 0;
-
- out:
- spec.running = false;
- spec.status = status;
- spec.clear();
-
- return status;
+ // TODO EXPORT
+// const nframes_t blocksize = 4096;
+// nframes_t to_read;
+// int status = -1;
+//
+// spec.channels = _sources.size();
+//
+// if (spec.prepare (blocksize, session.frame_rate())) {
+// goto out;
+// }
+//
+// spec.pos = 0;
+// spec.total_frames = _length;
+//
+// while (spec.pos < _length && !spec.stop) {
+//
+//
+// /* step 1: interleave */
+//
+// to_read = min (_length - spec.pos, blocksize);
+//
+// if (spec.channels == 1) {
+//
+// if (read_raw_internal (spec.dataF, _start + spec.pos, to_read) != to_read) {
+// goto out;
+// }
+//
+// } else {
+//
+// Sample buf[blocksize];
+//
+// for (uint32_t chan = 0; chan < spec.channels; ++chan) {
+//
+// if (audio_source(chan)->read (buf, _start + spec.pos, to_read) != to_read) {
+// goto out;
+// }
+//
+// for (nframes_t x = 0; x < to_read; ++x) {
+// spec.dataF[chan+(x*spec.channels)] = buf[x];
+// }
+// }
+// }
+//
+// if (spec.process (to_read)) {
+// goto out;
+// }
+//
+// spec.pos += to_read;
+// spec.progress = (double) spec.pos /_length;
+//
+// }
+//
+// status = 0;
+//
+// out:
+// spec.running = false;
+// spec.status = status;
+// spec.clear();
+//
+// return status;
+ return 0;
}
void