mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-13 14:13:32 +02:00
Redo format setting choices in Quality preferences
This commit is contained in:
@@ -42,6 +42,7 @@
|
||||
#include "ImportPlugin.h"
|
||||
|
||||
#include "../Tags.h"
|
||||
#include "../prefs/QualityPrefs.h"
|
||||
|
||||
#include "../Experimental.h"
|
||||
|
||||
@@ -350,8 +351,7 @@ FLACImportFileHandle::FLACImportFileHandle(const wxString & name)
|
||||
mStreamInfoDone(false),
|
||||
mUpdateResult(ProgressResult::Success)
|
||||
{
|
||||
mFormat = (sampleFormat)
|
||||
gPrefs->Read(wxT("/SamplingRate/DefaultProjectSampleFormat"), floatSample);
|
||||
mFormat = QualityPrefs::SampleFormatChoice();
|
||||
mFile = std::make_unique<MyFLACFile>(this);
|
||||
}
|
||||
|
||||
|
@@ -45,6 +45,7 @@
|
||||
#include "ImportPlugin.h"
|
||||
#include "../Internat.h"
|
||||
#include "../Tags.h"
|
||||
#include "../prefs/QualityPrefs.h"
|
||||
|
||||
#define DESC _("MP3 files")
|
||||
|
||||
@@ -498,8 +499,7 @@ enum mad_flow output_cb(void *_data,
|
||||
if(data->channels.empty()) {
|
||||
data->channels.resize(channels);
|
||||
|
||||
sampleFormat format = (sampleFormat) gPrefs->
|
||||
Read(wxT("/SamplingRate/DefaultProjectSampleFormat"), floatSample);
|
||||
auto format = QualityPrefs::SampleFormatChoice();
|
||||
|
||||
for(auto &channel: data->channels) {
|
||||
channel = data->trackFactory->NewWaveTrack(format, samplerate);
|
||||
|
@@ -42,6 +42,7 @@
|
||||
#include "../Prefs.h"
|
||||
#include "../Internat.h"
|
||||
#include "../Tags.h"
|
||||
#include "../prefs/QualityPrefs.h"
|
||||
|
||||
|
||||
#define DESC _("Ogg Vorbis files")
|
||||
@@ -108,8 +109,7 @@ public:
|
||||
mVorbisFile(std::move(vorbisFile))
|
||||
, mStreamUsage{ static_cast<size_t>(mVorbisFile->links) }
|
||||
{
|
||||
mFormat = (sampleFormat)
|
||||
gPrefs->Read(wxT("/SamplingRate/DefaultProjectSampleFormat"), floatSample);
|
||||
mFormat = QualityPrefs::SampleFormatChoice();
|
||||
|
||||
for (int i = 0; i < mVorbisFile->links; i++)
|
||||
{
|
||||
|
@@ -38,6 +38,7 @@
|
||||
|
||||
#include "../ondemand/ODManager.h"
|
||||
#include "../ondemand/ODComputeSummaryTask.h"
|
||||
#include "../prefs/QualityPrefs.h"
|
||||
|
||||
//If OD is enabled, he minimum number of samples a file has to use it.
|
||||
//Otherwise, we use the older PCMAliasBlockFile method since it should be fast enough.
|
||||
@@ -204,8 +205,7 @@ PCMImportFileHandle::PCMImportFileHandle(wxString name,
|
||||
// the quality of the original file.
|
||||
//
|
||||
|
||||
mFormat = (sampleFormat)
|
||||
gPrefs->Read(wxT("/SamplingRate/DefaultProjectSampleFormat"), floatSample);
|
||||
mFormat = QualityPrefs::SampleFormatChoice();
|
||||
|
||||
if (mFormat != floatSample &&
|
||||
sf_subtype_more_than_16_bits(mInfo.format))
|
||||
|
@@ -34,6 +34,7 @@ and sample size to help you importing data of an unknown format.
|
||||
#include "../ShuttleGui.h"
|
||||
#include "../UserException.h"
|
||||
#include "../WaveTrack.h"
|
||||
#include "../prefs/QualityPrefs.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <cstdio>
|
||||
@@ -193,8 +194,7 @@ void ImportRaw(wxWindow *parent, const wxString &fileName,
|
||||
// the quality of the original file.
|
||||
//
|
||||
|
||||
format = (sampleFormat)
|
||||
gPrefs->Read(wxT("/SamplingRate/DefaultProjectSampleFormat"), floatSample);
|
||||
format = QualityPrefs::SampleFormatChoice();
|
||||
|
||||
if (format != floatSample &&
|
||||
sf_subtype_more_than_16_bits(encoding))
|
||||
|
Reference in New Issue
Block a user