Skip to content

Commit

Permalink
ao_avfoundation: remove AOCONTROL_UPDATE_STREAM_TITLE
Browse files Browse the repository at this point in the history
  • Loading branch information
ruihe774 committed Mar 16, 2024
1 parent aa3ae0b commit 5283ecf
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions audio/out/ao_avfoundation.m
Original file line number Diff line number Diff line change
Expand Up @@ -181,21 +181,8 @@ static int control(struct ao *ao, enum aocontrol cmd, void *arg)
[p->renderer setVolume:*(float*)arg / 100];
return CONTROL_OK;

case AOCONTROL_UPDATE_MEDIA_ROLE: {
#if TARGET_OS_IPHONE
enum aocontrol_media_role role = *(enum aocontrol_media_role*)arg;
[AVAudioSession.sharedInstance setMode:(
(role == AOCONTROL_MEDIA_ROLE_MOVIE)
? AVAudioSessionModeMoviePlayback
: AVAudioSessionModeDefault
) error:nil];
return CONTROL_OK;
#else
return CONTROL_UNKNOWN;
#endif
}

default:
// AOCONTROL_UPDATE_STREAM_TITLE should be handled by remote_command_center.swift
return CONTROL_UNKNOWN;
}
}
Expand Down

0 comments on commit 5283ecf

Please sign in to comment.