mirror of
https://github.com/cookiengineer/audacity
synced 2026-03-31 11:35:50 +02:00
New attached structure ProjectSettings stores rate, snap-to, et al.
This commit is contained in:
@@ -382,6 +382,7 @@ static int set_dict_int(AVDictionary **dict, const char *key, int val)
|
||||
|
||||
bool ExportFFmpeg::InitCodecs(AudacityProject *project)
|
||||
{
|
||||
const auto &settings = ProjectSettings::Get( *project );
|
||||
AVCodec *codec = NULL;
|
||||
AVDictionary *options = NULL;
|
||||
AVDictionaryCleanup cleanup{ &options };
|
||||
@@ -391,7 +392,7 @@ bool ExportFFmpeg::InitCodecs(AudacityProject *project)
|
||||
mEncAudioCodecCtx->codec_id = ExportFFmpegOptions::fmts[mSubFormat].codecid;
|
||||
mEncAudioCodecCtx->codec_type = AVMEDIA_TYPE_AUDIO;
|
||||
mEncAudioCodecCtx->codec_tag = av_codec_get_tag(mEncFormatCtx->oformat->codec_tag,mEncAudioCodecCtx->codec_id);
|
||||
mSampleRate = (int)project->GetRate();
|
||||
mSampleRate = (int)settings.GetRate();
|
||||
mEncAudioCodecCtx->global_quality = -99999; //quality mode is off by default;
|
||||
|
||||
// Each export type has its own settings
|
||||
|
||||
Reference in New Issue
Block a user