Skip to content

Commit

Permalink
feat(mpv): mix with others
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmercerind committed Nov 14, 2023
1 parent 4286f55 commit 18cd32f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions patches/mpv-mix-with-others.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/audio/out/ao_audiounit.m b/audio/out/ao_audiounit.m
index 85b1226dc9..a4130357bc 100644
--- a/audio/out/ao_audiounit.m
+++ b/audio/out/ao_audiounit.m
@@ -115,7 +115,7 @@ static bool init_audiounit(struct ao *ao)

MP_VERBOSE(ao, "max channels: %ld, requested: %d\n", maxChannels, (int)ao->channels.num);

- [instance setCategory:AVAudioSessionCategoryPlayback error:nil];
+ [instance setCategory:AVAudioSessionCategoryPlayback withOptions:AVAudioSessionCategoryOptionMixWithOthers error:nil];
[instance setMode:AVAudioSessionModeMoviePlayback error:nil];
[instance setActive:YES error:nil];
[instance setPreferredOutputNumberOfChannels:prefChannels error:nil];
1 change: 1 addition & 0 deletions scripts/mpv/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ set -u # treat unset variables as an error
cd ${SRC_DIR}

patch -p1 <${PROJECT_DIR}/patches/mpv-fix-missing-objc.patch
patch -p1 <${PROJECT_DIR}/patches/mpv-mix-with-others.patch
if [ "${VARIANT}" == "audio" ]; then
patch -p1 <${PROJECT_DIR}/patches/mpv-remove-libass.patch
fi
Expand Down

0 comments on commit 18cd32f

Please sign in to comment.