Bug 116008 - juk can't play a certain mp3 file through artsd back end
Summary: juk can't play a certain mp3 file through artsd back end
Status: RESOLVED WORKSFORME
Alias: None
Product: arts
Classification: Miscellaneous
Component: artscontrol (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Stefan Westerfeld
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-09 17:42 UTC by Artem S. Tashkinov
Modified: 2006-01-13 12:59 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
"bad" mp3 file (976.56 KB, application/octet-stream)
2005-11-09 17:45 UTC, Artem S. Tashkinov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Artem S. Tashkinov 2005-11-09 17:42:16 UTC
Version:           1.5.0 (using KDE 3.4.92 (beta2, >= 20051010), compiled sources)
Compiler:          GCC 4.0.2 compilation flags used: -O2 -march=pentium2
OS:                Linux (i686) release 2.6.14-k8

I have some mp3 file which Juk plays very poorly (xmms/amp/BMP/mplayer play it OK). I.e. every two seconds juk makes pause in sound playng for around half a second. I runned artsd this way 
$ artsd -a alsa -l 0

but nothing interesting is in the log:

artsd version is 1.5.0
gsl: using Unix98 pthreads directly for mutexes and conditions
[artsd: 19071] SoundServerStartup --> got lock
ALSA driver: default
buffering: 7 fragments with 1024 bytes (audio latency is 40.6 ms)
Closing ALSA-driver
virtualize StereoVolumeControl
ALSA driver: default
buffering: 7 fragments with 1024 bytes (audio latency is 40.6 ms)
audio format is 44100 Hz, 16 bits, 2 channels
addDirectory(/opt/kde3/lib/mcop,)
addDirectory(/opt/kde3/lib/mcop/Arts,Arts)
addDirectory(/opt/kde3/lib/mcop/Arts/Environment,Arts::Environment)
addDirectory(/opt/kde3/lib/mcop/Noatun,Noatun)
addDirectory(/home/birdie/.mcop/trader-cache,)
Arts::MidiManager registered successfully.
[artsd: 19071] SoundServerStartup <-- released lock
UnixManager: got notifyIO
socketconnection created, fd = 11
search playobject, mimetype = audio/x-mp3
creating xineAudioPlayObject to play file
findPort(left)
have 2 ports
done
result 10
connect port left to left
findPort(right)
have 2 ports
done
result 10
connect port right to right
virtualize StereoVolumeControl
findPort(left)
have 2 ports
done
result 10
disconnect port left and left
findPort(right)
have 2 ports
done
result 10
disconnect port right and right
findPort(left)
have 2 ports
done
result 10
connect port left to inleft
findPort(right)
have 2 ports
done
result 10
connect port right to inright
findPort(outleft)
have 4 ports
done
result 74
connect port outleft to left
findPort(outright)
have 4 ports
done
result 74
connect port outright to right
devirtualize StereoVolumeControl
warning: leaving MCOP Dispatcher and still 12 object references alive.
  - Arts::SampleStorage
  - Arts::Synth_MULTI_ADD
  - Arts::Synth_MULTI_ADD
  - Arts::Synth_PLAY
  - Arts::StereoVolumeControl
  - Arts::StereoEffectStack
  - Arts::Synth_BUS_DOWNLINK
  - Arts::SoundServerV2
  - Arts::Synth_AMAN_PLAY
  - Arts::AudioManagerClient
  - Arts::MidiManager
  - Arts::Synth_BUS_UPLINK
warning: leaving MCOP Dispatcher and still 113 types alive.


At the same time my .xsession-errors file is full of errors like these ones:

fifo_audio_out: blocked for more than 67 ms,
fifo_audio_out: 1152 sample(s) discarded.
fifo_audio_out: blocked for more than 67 ms,
fifo_audio_out: 1152 sample(s) discarded.
fifo_audio_out: blocked for more than 56 ms,
fifo_audio_out: 1152 sample(s) discarded.
fifo_audio_out: blocked for more than 20 ms,
fifo_audio_out: 1152 sample(s) discarded.
fifo_audio_out: blocked for more than 20 ms,
fifo_audio_out: 1152 sample(s) discarded.
fifo_audio_out: blocked for more than 65 ms,
fifo_audio_out: 1152 sample(s) discarded.

BTW, mplayer plays this file well even through artsd!

Some info about this file:
bitrate: variable - average bitrate is 173Kbit/s
sample rate: 44100Hz
Comment 1 Artem S. Tashkinov 2005-11-09 17:45:07 UTC
Created attachment 13367 [details]
"bad" mp3 file

One megabyte extract from that file.
Comment 2 Artem S. Tashkinov 2005-11-09 17:47:20 UTC
I've been running Juk on my music collection for around hundred hours already and so far I have found the only problematic file.
Comment 3 Stefan Gehn 2005-11-09 18:58:38 UTC
try choosing "threaded oss" instead of the alsa driver in your soundserver configuration.
Comment 4 Artem S. Tashkinov 2005-11-10 16:03:48 UTC
Choosing "threaded oss" didn't help, except artsd error messages disappeared (but the issue remains)
Comment 5 Artem S. Tashkinov 2005-11-10 16:05:31 UTC
"Open Sound System" as the audio device also doesn't change anything.
Comment 6 Artem S. Tashkinov 2005-11-15 11:02:32 UTC
I have upgraded to KDE 3.5 and the problem is still here.

Please, anyone reassign the bug to the Juk developers and change Product and Component to Juk.
Comment 7 Artem S. Tashkinov 2006-01-13 12:59:57 UTC
The problem is indeed that artsd itself through libxine backend plays this file incorrectly. As soon as I deleted $KDEPREFIX/lib/mcop/xineAudioPlayObject.mcopclass, $KDEPREFIX/lib/mcop/xineVideoPlayObject.mcopclass and $KDEPREFIX/lib/libarts_xine.so everything now works fine.

With libxine:
search playobject, extension = mp3
creating xineAudioPlayObject to play file /tmp/simarik.mp3

Without libxine:
search playobject, extension = mp3
creating MP3PlayObject to play file /tmp/simarik.mp3

Playing this file with xine player itself proved it's a libxine 1.1.1 bug.