along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id$
*/
#include <gtkmm2ext/gtk_ui.h>
tlmodel = Gtk::ListStore::create(tlcols);
track_list.set_model (tlmodel);
track_list.append_column(_("Track"), tlcols.trackname);
- track_list.append_column_editable(_("Visible"), tlcols.visible);
+ track_list.append_column_editable(_("Show"), tlcols.visible);
track_list.set_headers_visible(true);
track_list.set_reorderable(false);
track_list.get_selection()->set_mode (Gtk::SELECTION_NONE);
Sample *buf = (Sample *) malloc(sizeof(Sample) * fft_graph.windowSize());
Sample *mixbuf = (Sample *) malloc(sizeof(Sample) * fft_graph.windowSize());
float *gain = (float *) malloc(sizeof(float) * fft_graph.windowSize());
- char *work = (char *) malloc(sizeof(char) * fft_graph.windowSize());
Selection s = PublicEditor::instance().get_selection();
TimeSelection ts = s.time;
RegionSelection ars = s.regions;
-
for (TrackSelection::iterator i = s.tracks.begin(); i != s.tracks.end(); ++i) {
- ARDOUR::AudioPlaylist *pl
- = dynamic_cast<ARDOUR::AudioPlaylist*>((*i)->playlist());
+ boost::shared_ptr<AudioPlaylist> pl
+ = boost::dynamic_pointer_cast<AudioPlaylist>((*i)->playlist());
if (!pl)
continue;
if (source_selection_ranges_rb.get_active()) {
// cerr << "Analyzing ranges on track " << *&rui->route().name() << endl;
- for (std::list<ARDOUR::AudioRange>::iterator j = ts.begin(); j != ts.end(); ++j) {
+ for (std::list<AudioRange>::iterator j = ts.begin(); j != ts.end(); ++j) {
- jack_nframes_t i = 0;
+ nframes_t i = 0;
int n;
while ( i < (*j).length() ) {
n = (*j).length() - i;
}
- n = pl->read(buf, mixbuf, gain, work, (*j).start + i, n);
+ n = pl->read(buf, mixbuf, gain, (*j).start + i, n);
if ( n < fft_graph.windowSize()) {
for (int j = n; j < fft_graph.windowSize(); j++) {
TimeAxisView *current_axis = (*i);
- for (std::set<RegionView *>::iterator j = ars.begin(); j != ars.end(); ++j) {
+ for (RegionSelection::iterator j = ars.begin(); j != ars.end(); ++j) {
// Check that the region is actually audio (so we can analyze it)
AudioRegionView* arv = dynamic_cast<AudioRegionView*>(*j);
if (!arv)
continue;
// cerr << " - " << (*j)->region().name() << ": " << (*j)->region().length() << " samples starting at " << (*j)->region().position() << endl;
- jack_nframes_t i = 0;
+ nframes_t i = 0;
int n;
- while ( i < arv->region().length() ) {
+ while ( i < arv->region()->length() ) {
// TODO: What about stereo+ channels? composite all to one, I guess
n = fft_graph.windowSize();
- if (i + n >= arv->region().length() ) {
- n = arv->region().length() - i;
+ if (i + n >= arv->region()->length() ) {
+ n = arv->region()->length() - i;
}
- n = arv->audio_region().read_at(buf, mixbuf, gain, work, arv->region().position() + i, n);
+ n = arv->audio_region()->read_at(buf, mixbuf, gain, arv->region()->position() + i, n);
if ( n < fft_graph.windowSize()) {
for (int j = n; j < fft_graph.windowSize(); j++) {
free(buf);
free(mixbuf);
- free(work);
track_list_ready = true;
} /* end lock */