1
0
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:
Paul Licameli
2019-05-27 10:17:16 -04:00
parent 327845b0ee
commit dd10e00a2d
40 changed files with 371 additions and 228 deletions

View File

@@ -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