Opened 9 years ago

Closed 3 years ago

#12594 closed bug (not reproducible)

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:
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 9 years ago.
syslog (318.3 KB ) - added by khallebal 9 years ago.

Download all attachments as: .zip

Change History (29)

by khallebal, 9 years ago

Attachment: Qmplay2 output added

comment:1 by khallebal, 9 years ago

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

comment:2 by humdinger, 9 years ago

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

comment:3 by Barrett, 9 years ago

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

comment:4 by khallebal, 9 years ago

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

comment:5 by khallebal, 9 years ago

Attached a syslog.

by khallebal, 9 years ago

Attachment: syslog added

comment:6 by Barrett, 9 years ago

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 9 years ago by Barrett (previous) (diff)

comment:7 by khallebal, 9 years ago

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 by Barrett, 9 years ago

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 by khallebal, 8 years ago

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 by Barrett, 8 years ago

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 by Barrett, 8 years ago

Resolution: fixed
Status: newclosed

Should be fixed in hrev50603.

comment:12 by khallebal, 8 years ago

Resolution: fixed
Status: closedreopened

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

comment:13 by pulkomandy, 8 years ago

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 by SeanCollins, 8 years ago

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

comment:15 by khallebal, 8 years ago

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 by Barrett, 8 years ago

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

comment:17 by khallebal, 8 years ago

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 by Barrett, 8 years ago

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 by Barrett, 8 years ago

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

comment:20 by vidrep, 8 years ago

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 by khallebal, 8 years ago

@ 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 by khallebal, 8 years ago

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 by Barrett, 8 years ago

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 by khallebal, 8 years ago

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 by korli, 6 years ago

Owner: changed from Barrett to nobody
Status: reopenedassigned

comment:26 by khallebal, 3 years ago

This one can be closed, the HW had died.

comment:27 by waddlesplash, 3 years ago

Resolution: not reproducible
Status: assignedclosed
Note: See TracTickets for help on using tickets.