MAX_AUDIO_CHANNELS -> MAX_DCP_AUDIO_CHANNELS.
[dcpomatic.git] / src / wx / audio_dialog.cc
index 78f3deab655b36eca6a956fc72cfb5b553b807e3..0e1316cf31979f21d3ec4790f1a3ba5bb7154461 100644 (file)
@@ -45,7 +45,7 @@ AudioDialog::AudioDialog (wxWindow* parent)
                side->Add (m, 1, wxALIGN_CENTER_VERTICAL | wxTOP, 16);
        }
 
-       for (int i = 0; i < MAX_AUDIO_CHANNELS; ++i) {
+       for (int i = 0; i < MAX_DCP_AUDIO_CHANNELS; ++i) {
                _channel_checkbox[i] = new wxCheckBox (this, wxID_ANY, std_to_wx (audio_channel_name (i)));
                side->Add (_channel_checkbox[i], 1, wxEXPAND | wxALL, 3);
                _channel_checkbox[i]->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&AudioDialog::channel_clicked, this, _1));
@@ -87,7 +87,7 @@ void
 AudioDialog::set_content (shared_ptr<AudioContent> c)
 {
        _content_changed_connection.disconnect ();
-       
+
        _content = c;
 
        try_to_load_analysis ();
@@ -104,9 +104,9 @@ AudioDialog::try_to_load_analysis ()
        if (!IsShown ()) {
                return;
        }
-       
+
        if (!boost::filesystem::exists (_content->audio_analysis_path())) {
-               _content->analyse_audio (bind (&AudioDialog::analysis_finished, this));
+               _analysis_finished_connection = _content->analyse_audio (bind (&AudioDialog::analysis_finished, this));
                return;
        }
        
@@ -144,11 +144,11 @@ void
 AudioDialog::channel_clicked (wxCommandEvent& ev)
 {
        int c = 0;
-       while (c < MAX_AUDIO_CHANNELS && ev.GetEventObject() != _channel_checkbox[c]) {
+       while (c < MAX_DCP_AUDIO_CHANNELS && ev.GetEventObject() != _channel_checkbox[c]) {
                ++c;
        }
 
-       assert (c < MAX_AUDIO_CHANNELS);
+       assert (c < MAX_DCP_AUDIO_CHANNELS);
 
        _plot->set_channel_visible (c, _channel_checkbox[c]->GetValue ());
 }