summaryrefslogtreecommitdiff
path: root/libs/ardour/test/audio_region_test.h
blob: e9e72044e92d6e7bf11b5c3e838623f9af2bd04e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
 * Copyright (C) 2012 Carl Hetherington <carl@carlh.net>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */

#include <boost/shared_ptr.hpp>
#include "test_needing_session.h"

namespace ARDOUR {
	class Playlist;
	class AudioPlaylist;
	class Source;
	class Region;
	class AudioRegion;
}

/** A parent class for tests which offers some audio regions,
 *  each with a staircase waveform within them.
 */
class AudioRegionTest : public TestNeedingSession
{
public:
	virtual void setUp ();
	virtual void tearDown ();

protected:
	boost::shared_ptr<ARDOUR::Playlist> _playlist;
	/** AudioPlaylist downcast of _playlist */
	boost::shared_ptr<ARDOUR::AudioPlaylist> _audio_playlist;
	boost::shared_ptr<ARDOUR::Source> _source;
	/** 16 regions, of length 100, each referencing a source which is 4096
	 *  samples of a staircase waveform.
	 */
	boost::shared_ptr<ARDOUR::Region> _r[16];
	/** AudioRegion downcasts of _r[] */
	boost::shared_ptr<ARDOUR::AudioRegion> _ar[16];
};