MWindow *mwindow = mixer_items->mwindow;
Mixer *mixer = mwindow->edl->mixers.get_mixer(idx);
if( !mixer ) return 0;
- ZWindow *zwindow = mwindow->get_mixer(mixer);
+ ZWindow *zwindow = mwindow->get_mixer(idx);
+ if( !zwindow )
+ zwindow = mwindow->get_mixer(mixer);
if( !zwindow->zgui ) {
zwindow->set_title(mixer->title);
zwindow->start();
return zwindow;
}
+ZWindow *MWindow::get_mixer(int idx)
+{
+ ZWindow *zwindow = 0;
+ zwindows_lock->lock("MWindow::get_mixer");
+ for( int i=0; !zwindow && i<zwindows.size(); ++i ) {
+ ZWindow *zwdw = zwindows[i];
+ if( !zwdw->running() ) continue;
+ if( zwdw->idx != idx ) continue;
+ zwindow = zwindows[i];
+ }
+ zwindows_lock->unlock();
+ return zwindow;
+}
+
void MWindow::close_mixer(ZWindow *zwindow)
{
zwindows_lock->lock("MWindow::close_mixer 0");
void close_mixers(int result=1);
void open_mixers();
ZWindow *get_mixer(Mixer *&mixer);
+ ZWindow *get_mixer(int idx);
void close_mixer(ZWindow *zwindow);
int mixer_track_active(Track *track);
void update_mixer_tracks();
int Track::index_in(Mixer *mixer)
{
- if( !mixer || mixer_id ) return -1;
+ if( !mixer || mixer_id < 0 ) return -1;
int k = mixer->mixer_ids.size();
while( --k >= 0 && mixer_id != mixer->mixer_ids[k] );
return k;
mixer_ids.remove_all();
strncpy(title, that.title, sizeof(title));
title[sizeof(title)-1] = 0;
+ show = that.show;
x = that.x; y = that.y;
w = that.w; h = that.h;
for( int i=0; i<that.mixer_ids.size(); ++i )