Skip to content

Commit

Permalink
Add support for Spatial Audio, #3444
Browse files Browse the repository at this point in the history
This commit will add setting the mpv ao property to avfoundation in the
mpvInit method of the MPVController class. This causes IINA to use the
AVFoundation framework for audio (which supports spatial audio) instead
of the Core Audio framework.
  • Loading branch information
low-batt committed May 4, 2024
1 parent 73c9608 commit 87abaff
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions iina/MPVController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,11 @@ not applying FFmpeg 9599 workaround
chkErr(mpv_set_option_string(mpv, MPVOption.ProgramBehavior.resetOnNextFile,
"\(MPVOption.PlaybackControl.abLoopA),\(MPVOption.PlaybackControl.abLoopB)"))

// As mpv support for audio using the AVFoundation framework is new we enable it before applying
// user's settings. This allows a user to roll back to the Core Audio framework should a problem
// be encountered with the new code.
chkErr(mpv_set_property_string(mpv, MPVOption.Audio.ao, "avfoundation"))

// Set user defined conf dir.
if Preference.bool(for: .enableAdvancedSettings),
Preference.bool(for: .useUserDefinedConfDir),
Expand Down

0 comments on commit 87abaff

Please sign in to comment.