MCPcopy Create free account
hub / github.com/TypesettingTools/Aegisub / Advanced_Audio

Function Advanced_Audio

src/preferences.cpp:363–427  ·  view source on GitHub ↗

Advanced Audio preferences subpage

Source from the content-addressed store, hash-verified

361
362/// Advanced Audio preferences subpage
363void Advanced_Audio(wxTreebook *book, Preferences *parent) {
364 auto p = new OptionPage(book, parent, _("Audio"), OptionPage::PAGE_SUB);
365
366 auto expert = p->PageSizer(_("Expert"));
367
368 wxArrayString ap_choice = to_wx(GetAudioProviderNames());
369 p->OptionChoice(expert, _("Audio provider"), ap_choice, "Audio/Provider");
370
371 wxArrayString apl_choice = to_wx(AudioPlayerFactory::GetClasses());
372 p->OptionChoice(expert, _("Audio player"), apl_choice, "Audio/Player");
373
374 auto cache = p->PageSizer(_("Cache"));
375 const wxString ct_arr[3] = { _("None (NOT RECOMMENDED)"), _("RAM"), _("Hard Disk") };
376 wxArrayString ct_choice(3, ct_arr);
377 p->OptionChoice(cache, _("Cache type"), ct_choice, "Audio/Cache/Type");
378 p->OptionBrowse(cache, _("Path"), "Audio/Cache/HD/Location");
379
380 auto spectrum = p->PageSizer(_("Spectrum"));
381
382 const wxString sq_arr[4] = { _("Regular quality"), _("Better quality"), _("High quality"), _("Insane quality") };
383 wxArrayString sq_choice(4, sq_arr);
384 p->OptionChoice(spectrum, _("Quality"), sq_choice, "Audio/Renderer/Spectrum/Quality");
385
386 const wxString sc_arr[5] = { _("Linear"), _("Extended"), _("Medium"), _("Compressed"), _("Logarithmic") };
387 wxArrayString sc_choice(5, sc_arr);
388 p->OptionChoice(spectrum, _("Frequency mapping"), sc_choice, "Audio/Renderer/Spectrum/FreqCurve");
389
390 p->OptionAdd(spectrum, _("Cache memory max (MB)"), "Audio/Renderer/Spectrum/Memory Max", 2, 1024);
391
392#ifdef WITH_AVISYNTH
393 auto avisynth = p->PageSizer("Avisynth");
394 const wxString adm_arr[3] = { "ConvertToMono", "GetLeftChannel", "GetRightChannel" };
395 wxArrayString adm_choice(3, adm_arr);
396 p->OptionChoice(avisynth, _("Avisynth down-mixer"), adm_choice, "Audio/Downmixer");
397 p->OptionAdd(avisynth, _("Force sample rate"), "Provider/Audio/AVS/Sample Rate");
398#endif
399
400#ifdef WITH_FFMS2
401 auto ffms = p->PageSizer("FFmpegSource");
402
403 const wxString error_modes[] = { _("Ignore"), _("Clear"), _("Stop"), _("Abort") };
404 wxArrayString error_modes_choice(4, error_modes);
405 p->OptionChoice(ffms, _("Audio indexing error handling mode"), error_modes_choice, "Provider/Audio/FFmpegSource/Decode Error Handling");
406
407 p->OptionAdd(ffms, _("Always index all audio tracks"), "Provider/FFmpegSource/Index All Tracks");
408#endif
409
410#ifdef WITH_PORTAUDIO
411 auto portaudio = p->PageSizer("Portaudio");
412 p->OptionChoice(portaudio, _("Portaudio device"), PortAudioPlayer::GetOutputDevices(), "Player/Audio/PortAudio/Device Name");
413#endif
414
415#ifdef WITH_OSS
416 auto oss = p->PageSizer("OSS");
417 p->OptionBrowse(oss, _("OSS Device"), "Player/Audio/OSS/Device");
418#endif
419
420#ifdef WITH_DIRECTSOUND

Callers 1

PreferencesMethod · 0.85

Calls 7

GetAudioProviderNamesFunction · 0.85
GetClassesFunction · 0.85
PageSizerMethod · 0.80
OptionChoiceMethod · 0.80
OptionBrowseMethod · 0.80
OptionAddMethod · 0.80
to_wxFunction · 0.70

Tested by

no test coverage detected