summaryrefslogtreecommitdiff
path: root/libs/ardour/test/audio_region_test.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2012-04-30 19:44:14 +0000
committerCarl Hetherington <carl@carlh.net>2012-04-30 19:44:14 +0000
commit7314f66b953e594b630d7725d3520e0f086a2db4 (patch)
tree77f562cff65a4b6b395000c3c92d70845013c29b /libs/ardour/test/audio_region_test.cc
parentbc2f8348b51332f7078726c1ab8c0deac8b49921 (diff)
Clarify behaviour of ::read (overwrites its buffer) wrt ::read_at (mixes into its buffer).
Refactor things slightly, removing need for ReadOps. Fix crash on teardown of test. Fixes Rhythm Ferret. git-svn-id: svn://localhost/ardour2/branches/3.0@12127 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/test/audio_region_test.cc')
-rw-r--r--libs/ardour/test/audio_region_test.cc13
1 files changed, 2 insertions, 11 deletions
diff --git a/libs/ardour/test/audio_region_test.cc b/libs/ardour/test/audio_region_test.cc
index 72e886b4e1..cd1986b19b 100644
--- a/libs/ardour/test/audio_region_test.cc
+++ b/libs/ardour/test/audio_region_test.cc
@@ -23,19 +23,10 @@ AudioRegionTest::readTest ()
/* Simple read: 256 frames from start of region, no fades */
- /* gbuf should be ignored; set it to 0 to ensure that it is */
- for (int i = 0; i < N; ++i) {
- gbuf[i] = 0;
- }
-
ar->set_position (P);
ar->set_length (1024);
- for (int i = 0; i < N; ++i) {
- buf[i] = 0;
- }
-
- ar->_read_at (ar->_sources, ar->_length, buf, mbuf, gbuf, P, 256, 0, AudioRegion::ReadOps (0));
+ ar->read_from_sources (ar->_sources, ar->_length, buf, P, 256, 0);
check_staircase (buf, 0, 256);
for (int i = 0; i < N; ++i) {
@@ -43,7 +34,7 @@ AudioRegionTest::readTest ()
}
/* Offset read: 256 frames from 128 frames into the region, no fades */
- ar->_read_at (ar->_sources, ar->_length, buf, mbuf, gbuf, P + 128, 256, 0, AudioRegion::ReadOps (0));
+ ar->read_from_sources (ar->_sources, ar->_length, buf, P + 128, 256, 0);
check_staircase (buf, 128, 256);
/* Simple read with a fade-in: 256 frames from start of region, with fades */