Opened 14 years ago
Closed 14 years ago
#9154 closed defect (Works for me)
[MythMusic] Music stops when changing track
Reported by: | Sander Knopper | Owned by: | JYA |
---|---|---|---|
Priority: | minor | Milestone: | unknown |
Component: | MythTV - Audio Output | Version: | Master Head |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
Hi all,
The current trunk has this problem for some time.
When playing a song in MythMusic everything goes fine, but the moment the track is changed from one to another sometimes the music stops. That means, the audio is gone and there is a "ALSA: buffer underrun" message in the log. The timer in MythMusic keeps moving though. Then after some time or after changing to yet another track the sound is there again. Whether the track has changed simply because the end of a track has been reached or by hand doesn't matter.
The problem manifests itself about every 2-3 tracks.
The computer system running Myth is connected to an amplifier using SPDIF.
I'm willing to post any other information if necessary.
Attachments (2)
Change History (18)
comment:1 Changed 14 years ago by
Status: | new → assigned |
---|
comment:2 Changed 14 years ago by
comment:3 Changed 14 years ago by
Status: | assigned → infoneeded |
---|
comment:4 Changed 14 years ago by
Log files have been attached.
The log files contain the output up to (and including) when the problem occurs after switching to another song when the previous song has ended.
comment:5 Changed 14 years ago by
Thanks for the logs.
One thing that stands out if I'm reading the logs correctly is the mix of 16 and 32bit files which could be the problem. Could you do a bit of detective work to find out if it is only the 32bit files that wont play, or is it the switch from one to the other. If you play only 16bit or only 32bit files does that work OK? Have you tried to play the files using another player?
I'm no audio expert but the fact you say the time updates like it's playing OK suggests the decoding and audio output is working as intended but your amplifier can't handle what is being sent to it.
comment:6 Changed 14 years ago by
I'll do some "detective work" probably tomorrow.
I can say that everything works perfectly fine when playing the same files using MPD. I do think you could be right about the amplifier, there's a weird crack of sound when things go wrong.
I also don't really understand why there are 16 and 32 bit files, everything is encoded using lame with the same settings. As you can see in the logs, I'm playing 2 songs from Joe Satriani which are on the same album and thus encoded in the same run. So it's weird they aren't in the same format. At least to me.
Nonetheless, I'll be back with more info.
comment:7 Changed 14 years ago by
Another note, there are 3 lines in the log of the form: "Original codec..................."
All three of them read "signed 16 bit". The only difference is the sample rate, but output is forced at 48kHz.
comment:8 Changed 14 years ago by
Did some more testing today. I put 2 tracks in the playlist which are equal in terms of audio format. Both lame encoded, 2 channels, 44.1kHZ.
I've tried with sampe rate conversion set to the default and "best". Made no difference.
When I turn off and on the amplifier the music is there again. So mythmusic must be thinking everything is peachy while my amplifier surely isn't thinking that.
But again, when I play those same 2 files with mpd, there's no problem at all.
comment:9 Changed 14 years ago by
I just tried something else to determine whether this problem just occurs in MythMusic or maybe somewhere else too.
Turns out that there's a (minor) glitch in MythVideo? as well. When a video is started that has audio in a different format than the previous movie, the movie needs to get started twice before sound works.
comment:10 Changed 14 years ago by
You are forcing 48kHz resampling, so all audio is converted to 32 bits first, resampled. As the audio device supports 32 bits, there is no need to reformat back to 16 bits.
Why are you forcing resampling to 48kHz to start with ?
That turning your amp off then on make the audio comes back to live; indicates that some of the issues (not all, this doesn't explain the buffer underruns) are with your amplifier.
If the issue is mishandling of 32 bits audio by your amp, you will reduce the issue by not forcing the resampling to 48kHz as the audio will stay 16 bits all the way
comment:11 Changed 14 years ago by
I'm basically resampling to 48Khz because I have a lot of music which is ripped of DVD (live concerts) and when moving from a track that's samled at 44.1kHz to one of the tracks that's sampled at 48kHz there's a very annoying high pitched crack. Given the fact that these kind of transitions (like I described or vice versa) happen quite frequently, this isn't very pleasant.
I'll try to disable the resampling for a while though and see if it makes any difference.
comment:12 Changed 14 years ago by
I've disabled forced resampling and did some testing today.
When only playing music sampled at 44.1kHz the problem still occurs, but less frequent. At the moment it switches to a song sampled at 48kHz most of the time I hear this high pitched sound again and music isn't hearable anymore. Turning the amplifier off/on still solves it.
comment:13 Changed 14 years ago by
Maybe a fix would be to get an amp that doesn't require rebooting ?
comment:14 Changed 14 years ago by
Yes, I guess that would probably fix it.
The strange thing is though, that when I force output at 48kHz within mpd everything works fine.
comment:15 Changed 14 years ago by
Component: | Plugin - MythMusic → MythTV - Audio Output |
---|---|
Owner: | changed from paulh to JYA |
Status: | infoneeded → assigned |
This is more of an audio problem than a MythMusic one so re-assigning to jyavenard to decide if there is anything we can do in Myth to prevent the audio drop outs.
comment:16 Changed 14 years ago by
Resolution: | → Works for me |
---|---|
Status: | assigned → closed |
If restarting the amplifier prevents the problem to occur, the issue is more than likely with the amplifier bugging out.
Can't reproduce it
I suspect this is an audio problem and not a MythMusic problem but lets start with a log created with mythfrontend -v playback. If that doesn't show anything interesting try adding 'audio' to the verbose parameter.