13
0

audition: resampler use same quality as import

This commit is contained in:
Robin Gareus 2014-01-19 00:45:08 +01:00
parent 6eb076bd69
commit 8b71e40fbd
2 changed files with 11 additions and 1 deletions

View File

@ -391,7 +391,7 @@ SoundFileBox::audition ()
path, n,
Source::Flag (0), false));
if (afs->sample_rate() != _session->nominal_frame_rate()) {
boost::shared_ptr<SrcFileSource> sfs (new SrcFileSource(*_session, afs));
boost::shared_ptr<SrcFileSource> sfs (new SrcFileSource(*_session, afs, _src_quality));
srclist.push_back(sfs);
} else {
srclist.push_back(afs);
@ -1682,6 +1682,7 @@ SoundFileOmega::SoundFileOmega (string title, ARDOUR::Session* s,
set_popdown_strings (src_combo, str);
src_combo.set_active_text (str.front());
src_combo.set_sensitive (false);
src_combo.signal_changed().connect (sigc::mem_fun (*this, &SoundFileOmega::src_combo_changed));
reset_options ();
@ -1792,6 +1793,12 @@ SoundFileOmega::get_src_quality() const
}
}
void
SoundFileOmega::src_combo_changed()
{
preview.set_src_quality(get_src_quality());
}
ImportDisposition
SoundFileOmega::get_channel_disposition () const
{

View File

@ -70,6 +70,7 @@ class SoundFileBox : public Gtk::VBox, public ARDOUR::SessionHandlePtr, public P
void audition();
bool audition_oneshot();
bool autoplay () const;
void set_src_quality(ARDOUR::SrcQuality q) { _src_quality = q; }
protected:
std::string path;
@ -117,6 +118,7 @@ class SoundFileBox : public Gtk::VBox, public ARDOUR::SessionHandlePtr, public P
bool seek_button_press(GdkEventButton*);
bool seek_button_release(GdkEventButton*);
bool _seeking;
ARDOUR::SrcQuality _src_quality;
};
class SoundFileBrowser : public ArdourWindow
@ -313,6 +315,7 @@ class SoundFileOmega : public SoundFileBrowser
bool reset_options ();
void reset_options_noret ();
bool bad_file_message ();
void src_combo_changed ();
void do_something (int action);
};