Frozen audio on resuming

iOS, iPad, iPhone, tvOS specific usage questions
Matisse
New Cone
New Cone
Posts: 2
Joined: 21 Dec 2022 18:32

Frozen audio on resuming

Postby Matisse » 21 Dec 2022 18:46

Hi,

Whenever I pause a video or audio, and then resume it, there’s a slight delay (around 1 second) before the audio plays again. If it is a video I’m watching, the video resumes immediately, but the audio freezes for a second before resuming.

This happens both on my iPhone 8 Plus and iPad Air 2. On my iPhone I have iOS 16.2 installed.

As an example, the video with which I’m having this problem is h264 mp4a encoded.

VLC version:

VLC for iOS

Version: 3.3.12 (447)

Based on:
3.0.18-49-g6d05e51307

This is something happening for years. It is something preventing me from using this app, and I’ll be very glad if something is done about it. Thanks.

Matisse

fkuehne
Developer
Developer
Posts: 7295
Joined: 16 Mar 2004 19:37
VLC version: 0.4.6 - present
Operating System: Darwin
Location: Germany
Contact:

Re: Frozen audio on resuming

Postby fkuehne » 24 Dec 2022 07:46

This is fixed for version 4 of VLC scheduled for next year. So far, this cannot be fixed by you in the app.
VideoLAN
Felix Paul Kühne
Medic. VLC developer for appleOS since before you were born.
Blog: https://www.feepk.net

Matisse
New Cone
New Cone
Posts: 2
Joined: 21 Dec 2022 18:32

Re: Frozen audio on resuming

Postby Matisse » 11 May 2023 18:50

The above problem still hasn’t been fixed. I understand it will be fixed in VLC 4. Will it be released this year? I hope it’s the next version.

fkuehne
Developer
Developer
Posts: 7295
Joined: 16 Mar 2004 19:37
VLC version: 0.4.6 - present
Operating System: Darwin
Location: Germany
Contact:

Re: Frozen audio on resuming

Postby fkuehne » 19 May 2023 15:46

We sincerely hope that 2023 will be the year of VLC 4, yes.
VideoLAN
Felix Paul Kühne
Medic. VLC developer for appleOS since before you were born.
Blog: https://www.feepk.net

8kguy
New Cone
New Cone
Posts: 4
Joined: 12 Feb 2024 16:57

Re: Frozen audio on resuming

Postby 8kguy » 12 Feb 2024 17:11

I noticed something strange in the VLCKit code that may be related to the issue.
Inside VLCMediaPlayer.m we currently have this:

Code: Select all

- (void)play { libvlc_media_player_play(_playerInstance); } - (void)pause { libvlc_media_player_set_pause(_playerInstance, 1); }
Looking at vlc/lib/media_player.c which contains both libvlc functions called here, we see that libvlc_media_player_play always calls vlc_player_start before possibly calling resume.

Code: Select all

int libvlc_media_player_play( libvlc_media_player_t *p_mi ) { vlc_player_t *player = p_mi->player; vlc_player_Lock(player); int ret = vlc_player_Start(player); if (ret == VLC_SUCCESS) { if (vlc_player_IsPaused(player)) vlc_player_Resume(player); } vlc_player_Unlock(player); return ret; }
Meanwhile, under libvlc_media_player_set_pause, we see that it can either call pause/stop or resume, depending on the number specified in the second parameter.

Code: Select all

void libvlc_media_player_set_pause( libvlc_media_player_t *p_mi, int paused ) { vlc_player_t *player = p_mi->player; vlc_player_Lock(player); if (paused) { if (vlc_player_CanPause(player)) vlc_player_Pause(player); else vlc_player_Stop(player); } else { vlc_player_Resume(player); } vlc_player_Unlock(player); }
Could it be that we were supposed to call libvlc_media_player_set_pause to resume playback instead of libvlc_media_player_play?


Return to “VLC for iOS, iPadOS and Apple TV”

Who is online

Users browsing this forum: No registered users and 29 guests