Opened 3 years ago

Last modified 11 days ago

#12594 assigned bug

Stuttering sound playing video/audio files with any player

Reported by: khallebal Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: Kits/Media Kit Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

Tried with MediaPlayer, mpv and QMplay2, the sound starts stuttering then goes real slow like an old tape then normal again and so on... Output from Qmplay2 shows a latency issue in MediaKit.(i could be wrong though).

Attachments (2)

Qmplay2 output (1.8 KB) - added by khallebal 3 years ago.
syslog (318.3 KB) - added by khallebal 3 years ago.

Download all attachments as: .zip

Change History (27)

Changed 3 years ago by khallebal

Attachment: Qmplay2 output added

comment:1 Changed 3 years ago by khallebal

Sorry, i meant "Stuttering sound when playing video/audio files with any player" i can't change the title.

comment:2 Changed 3 years ago by humdinger

Summary: Stuttering sound when video/audio files with any playerStuttering sound playing video/audio files with any player

comment:3 Changed 3 years ago by Barrett

Can you specify which hardware (vm?) are you running from?

comment:4 Changed 3 years ago by khallebal

This is an old pentium 4, 3Ghz, 1 GB RAM and a via ac97 sound card.

comment:5 Changed 3 years ago by khallebal

Attached a syslog.

Changed 3 years ago by khallebal

Attachment: syslog added

comment:6 Changed 3 years ago by Barrett

This bug might have been caused by the printfs recently removed in SoundPlayer. If you find some time to do that, please test it under recent revs. It would be useful also to know which rev you were using at the time this issue was reported.

Last edited 3 years ago by Barrett (previous) (diff)

comment:7 Changed 3 years ago by khallebal

Since hrev:50260 it is somewhat better but only for the gcc2 arch, i still have some stuttering when my wifi is enabled but not connected, if i disable or connect my wifi the stuttering goes away. But as for the gcc4 arch, the sound is horrible, i can barely hear the sound of the video, which is full of ticking and crackling noise and real slow like an old tape. Just noticed that videos with mp3 sound are not effected by this, so far only AAC and OGG audio is effected.

comment:8 Changed 3 years ago by Barrett

I think there are two issues there, one is some decoding problems with ffmpeg and another is related to events scheduling.

To test if media playback is correct open Cortex and instantiate a ToneProducer, connect it to the mixer and start it. You should hear a pure sinus wave if events are scheduled correctly, in that case the problem is in ffmpeg more than the media_kit itself. Hope that helps.

comment:9 Changed 3 years ago by khallebal

Well the test seems to point towards the mediakit because i do hear ticks, is there a way i can get you some usefull debugging info?

comment:10 Changed 3 years ago by Barrett

Build Haiku in debugging mode, run Cortex from terminal, save the output to a file and then attach it to this ticket. In theory it will show latency notices.

comment:11 Changed 2 years ago by Barrett

Resolution: fixed
Status: newclosed

Should be fixed in hrev50603.

comment:12 Changed 2 years ago by khallebal

Resolution: fixed
Status: closedreopened

Unfortunatly nothing is fixed, all the symptoms mentioned above are still there, tested with hrev:50608.

comment:13 Changed 2 years ago by pulkomandy

It could be a bug in the ac97 driver, right? Not all problems can be attributed to the media kit.

Other users with AC97 machines around?

comment:14 Changed 2 years ago by SeanCollins

I might have a AC97 sound card, I will look tonight, if I do, where do you want it mailed ?

comment:15 Changed 2 years ago by khallebal

I tested with an old dell latitude which happens to have an intel ac97 driver and indeed it seems to be the ac97 codec that is at fault, so i guess it is a bug which has been revealed with the recent changes in the Media Kit, so Via or intel it's the same buggy codec.

comment:16 Changed 2 years ago by Barrett

Yes it's definitely a timing bug in the ac97 driver.

comment:17 Changed 2 years ago by khallebal

Sorry for spoiling the celebration, but i just installed opensoundsystem, blacklisted the Auvia driver.. Unfortunately the behaviour is the same, so i guess we're back to square one.

Let me summarize this ticket: The sound in the videos is really slow as an old tape with a distortion you would hear when you plug a mic with bad cable. But this behaviour does not occure when the audio is in mp3 or wave format, it happens with AAC, AC-3, OGG and FLAC. It used to be with gcc2 and x86, but now it's only with x86. Another symptom is if my wifi is not connected i hear stuttering, the workaround here is either to connect or disable the wifi altogether. For the crackle noise mentioned in #12817, it is still there and easily reproducible with cortex.

comment:18 Changed 2 years ago by Barrett

So it seems to me that this issue didn't happen to you, so it's a regression. If my guess is OK then I'd like to know the exact hrev range where it happened. You can do it using bisection (there's a doc on how to do that if you don't know exactly what I mean).

comment:19 Changed 2 years ago by Barrett

If I understand correctly the issue doesn't happen anymore under gcc2?

comment:20 Changed 2 years ago by vidrep

This ticket might be duplicate of his earlier ticket #5828. In any case, there are many unresolved ac97 tickets in trac dating back as far as Alpha 1.

comment:21 Changed 2 years ago by khallebal

@ Barrett, yes corrrect, as i said it doesn't occur with mp3 or wave files.

@ Vidrep, no that's toally a diffrent issue and different mobo.

comment:22 Changed 2 years ago by khallebal

The stuttering has been fixed in hrev50639 which was also mentioned in ticket #12720. Now what's left in this ticket is the other 2 symptoms.

a) the ticking when the wifi is not connected

b) the crackling like an old vinyl disc which occur with any audio.

comment:23 Changed 2 years ago by Barrett

a) doesn't look like related to media_kit b) this is an issue known when playing audio from cd, is it your case?

comment:24 Changed 2 years ago by khallebal

No this is not my case, it happens with every movie or audio file i play from the HD, it's been going on for over a year. unfortunatly i don't have a reliable internet connection to do a binary search, it would feel like an everyday job.

comment:25 Changed 11 days ago by korli

Owner: changed from Barrett to nobody
Status: reopenedassigned
Note: See TracTickets for help on using tickets.