forked from mia/Aegisub
[Shinon] Change Mono Downmixing to Stereo Downmixing
This commit is contained in:
parent
dabd9f699f
commit
f06e42a82e
2 changed files with 5 additions and 3 deletions
|
@ -166,10 +166,11 @@ void FFmpegSourceAudioProvider::LoadAudio(agi::fs::path const& filename) {
|
|||
}
|
||||
|
||||
if (OPT_GET("Provider/Audio/FFmpegSource/Downmix")->GetBool()) {
|
||||
if (channels > 1 || bytes_per_sample != 2 || float_samples) {
|
||||
if (channels > 2 || bytes_per_sample != 2 || float_samples) {
|
||||
std::unique_ptr<FFMS_ResampleOptions, decltype(&FFMS_DestroyResampleOptions)>
|
||||
opt(FFMS_CreateResampleOptions(AudioSource), FFMS_DestroyResampleOptions);
|
||||
opt->ChannelLayout = FFMS_CH_FRONT_CENTER;
|
||||
if (channels > 2)
|
||||
opt->ChannelLayout = FFMS_CH_FRONT_LEFT | FFMS_CH_FRONT_RIGHT;
|
||||
opt->SampleFormat = FFMS_FMT_S16;
|
||||
|
||||
// Might fail if FFMS2 wasn't built with libavresample
|
||||
|
|
|
@ -401,7 +401,8 @@ void Advanced_Audio(wxTreebook *book, Preferences *parent) {
|
|||
p->OptionChoice(ffms, _("Audio indexing error handling mode"), error_modes_choice, "Provider/Audio/FFmpegSource/Decode Error Handling");
|
||||
|
||||
p->OptionAdd(ffms, _("Always index all audio tracks"), "Provider/FFmpegSource/Index All Tracks");
|
||||
p->OptionAdd(ffms, _("Downmix to 16bit mono audio"), "Provider/Audio/FFmpegSource/Downmix");
|
||||
wxControl* stereo = p->OptionAdd(ffms, _("Downmix to stereo"), "Provider/Audio/FFmpegSource/Downmix");
|
||||
stereo->SetToolTip("Reduces memory usage on surround audio, but may cause audio tracks to sound blank in specific circumstances. This will not affect audio with two channels or less.");
|
||||
#endif
|
||||
|
||||
#ifdef WITH_PORTAUDIO
|
||||
|
|
Loading…
Reference in a new issue