diff --git a/src/import/ImportFFmpeg.cpp b/src/import/ImportFFmpeg.cpp index 24814b193..f5f7177c4 100644 --- a/src/import/ImportFFmpeg.cpp +++ b/src/import/ImportFFmpeg.cpp @@ -516,7 +516,7 @@ ProgressResult FFmpegImportFileHandle::Import(WaveTrackFactory *trackFactory, sc->m_initialchannels = sc->m_stream->codec->channels; stream.resize(sc->m_stream->codec->channels); for (auto &channel : stream) - channel = trackFactory->NewWaveTrack(sc->m_osamplefmt, sc->m_stream->codec->sample_rate); + channel = NewWaveTrack(*trackFactory, sc->m_osamplefmt, sc->m_stream->codec->sample_rate); } // Handles the start_time by creating silence. This may or may not be correct. diff --git a/src/import/ImportMP3.cpp b/src/import/ImportMP3.cpp index 4529247ff..0f66adabf 100644 --- a/src/import/ImportMP3.cpp +++ b/src/import/ImportMP3.cpp @@ -64,7 +64,6 @@ static Importer::RegisteredUnusableImportPlugin registered #include "../Prefs.h" #include "../Tags.h" #include "../WaveTrack.h" -#include "../prefs/QualityPrefs.h" #include "../widgets/AudacityMessageBox.h" #include "../widgets/ProgressDialog.h" @@ -1034,11 +1033,12 @@ enum mad_flow MP3ImportFileHandle::OutputCB(struct mad_header const * WXUNUSED(h mChannels.resize(mNumChannels); - auto format = QualityPrefs::SampleFormatChoice(); - for (auto &channel: mChannels) { - channel = mTrackFactory->NewWaveTrack(format, pcm->samplerate); + // Mad library header explains the 32 bit fixed point format with + // 28 fractional bits. Effective sample format must therefore be + // more than 24, and this is our only choice now. + channel = NewWaveTrack(*mTrackFactory, floatSample, pcm->samplerate); } }