Playback at high-speed

Hi,

I'm running mocp 2.5.0-beta1 on Ubuntu 14.04.

When playing MP3 files the playback is stuck at a high speed, like if I were constantly seeking forward using the right arrow key.

Thanks.

Forums:

Could you comment on the similarities and differences between your problem and that described in this other post?

I don't believe that is similar to what I have.

OS: Debian/testing
moc: 2.5.0
cpu: amd64
music format: ogg

I have the same problem as "runonce" does. I was using the default settings and started mocp from the command line. I would try to play a song and it would just speed through the song.

I tried the following to narrow it down:

1. I only had ALSA and OSS on my system, so I set the default SoundDriver setting to be ALSA:OSS. I still had the speedup issue. I reversed the order of the sound drivers so that it was OSS:ALSA. Now it worked just fine !!

2. I set SoundDriver to be just OSS. This worked fine. I set it to just ALSA, and got the speed up again.

3. This got me thinking if it would work with JACK or not. I installed JACK (1.9.10+20140719git3eb0ae6a~dfsg-2), and started MOC with mocp -R jack. This worked fine as well.

So it seems something to do with ALSA. I have logs from running mocp -D -R alsa -m ~/Music if that will help. Where should I send them ?

You should probably send those logs to mocmaint email address.

Since you mentioned ogg, is your issue ogg specific or does it happen on other decoders as well?

I will try and regenerate them, as I deleted them while trying to generate logs for my proxy related issue.

What is the mocmaint email address anyway ? Or is it some place I can look it up ?

Never mind. Found it.

It happens with a MP3 as well as with OGG. I don't believe it is related to which format is used.

Thank you for the detail of your problem report; it's been much more useful than you might have thought. It has made me realise that it may be a different presentation of the repeating audio problem (also reported here) in that they could perhaps both be accounted for by the same skipping but in different directions.

Could you please elaborate on "speed through the song" for me. Do you mean by that the audio is played in its entirety but at high speed (as if the sample rate were being misinterpreted), or that the playback consists of a succession of small portions of the audio each played at normal speed (as if only the first few frames of each packet were being played)?

User "GenghisKhan" and I have spent a great deal of time and effort pursuing the repeating audio problem and the ALSA driver has received more scrutiny and testing from me than any other component of MOC. In all that time, no bugs which would explain this problem have been detected although numerous clean-ups have suggested themselves. The problem is so rare that I strongly suspect it is some combination of hardware and ALSA version, yet you appear to be using quite a common mix of both. So, exactly which version of the various ALSA component packages are you using?

From your post I gather than you're reasonably proficient in handling Debian packages, so could you try something for me: could you try using OSS emulation in ALSA to see if the problem reappears. If it does then I think we will have eliminated all the common paths within MOC and it may be time to get the ALSA folk involved.

The major impediment to debugging the repeating audio problem is that it has been so rare and so time-consuming to reproduce. I'm hoping that if we can solve your problem, which seems much more easily reproducible, then we may be able to slaughter these two poor little birdies with one nasty rock. So please, please don't just go silent on us at this point as users "runonce" and "azurtem" did.

The song is played in its entirety but at a very high speed. So if you have a 4 minute long song, it is played in say 20 seconds. There is no skipping, or only playing back of small portions of audio. It is as if someone put in a cassette into the tape deck, and
was holding down the forward and play buttons at the same time. That's exactly what the effect is.

bash% dpkg-query -l | grep -i alsa
ii alsa-base 1.0.27+1
ii alsa-utils 1.0.28-1
ii alsamixergui 0.9.0rc2-1-9.1
ii alsaplayer-alsa 0.99.81-1+b1
ii alsaplayer-text 0.99.81-1+b1
ii gstreamer0.10-alsa:amd64 0.10.36-2
ii gstreamer1.0-alsa:amd64 1.4.3-1.1
ii libasound2:amd64 1.0.28-1
ii libasound2:i386 1.0.28-1
ii libasound2-data 1.0.28-1
ii libasound2-dev:amd64 1.0.28-1
ii libasound2-plugins:amd64 1.0.28-1+b1
ii libasound2-plugins:i386 1.0.28-1+b1

I will follow up to this post tomorrow or so with more information regarding using OSS emulation in ALSA. I presume you mean installing
the alsa-oss and alsaplayer-oss packages which wrap ALSA around OSS and then trying it with the driver set to ALSA. If I'm mistaken,
let me know and I'll gladly do it if I can.

I have an MP3 of "Eye of the Tiger" by Survivor, which is 4:04 long. The whole song is finished playing in 9 seconds.
The MP3 is 44 kHz, 128 kbps according to MOC.

I installed alsa-oss and alsaplayer-oss and ran MOC, using only ALSA for the sound driver. I still get the same result.

Output from lspci -v:

00:1b.0 Audio device: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller (rev 04)
Subsystem: Lenovo Device 21f3
Flags: bus master, fast devsel, latency 0, IRQ 45
Memory at f2530000 (64-bit, non-prefetchable) [size=16K]
Capabilities: [50] Power Management version 2
Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00
Capabilities: [100] Virtual Channel
Capabilities: [130] Root Complex Link
Kernel driver in use: snd_hda_intel

Let me know if there is anything else you'd like me to try.


I presume you mean installing the alsa-oss and alsaplayer-oss packages which wrap ALSA around OSS and then trying it with the driver set to ALSA.

alsa-oss is ALSA emulating the OSS kernel interface, so you'll be needing to set the driver to OSS. The aim here is to exclude MOC's ALSA driver from the codepath so that the only component left in common is ALSA itself.

Unfortunately, the only result from which we'll be able to draw a definite conclusion is if the audio plays at high speed when using the OSS driver. If it plays normally it could still be the ALSA driver, but it could also be the codepath within the ALSA library which is unique to the native ALSA API.

So I'll need to ensure that I don't have OSS installed first, just to guarantee that alsa-oss is the one that is picked up, yes ?

... you will need to do that. I don't know how a conflict would be resolved if both were present.

OK I'll try to see what I can do for that. Hopefully doesn't involve the removal of lots of packages. I'll ask around on the Debian forums and channels.

I tried posting earlier but was told what I was posting was spam.
Strange as all it had was a listing of the packages I have on my system, related to OSS.

If this post comes through I'll re-submit the previous post.

I got the high-speed problem with a FiiO USB DAC-E07K.

It worked for me if I unplug and plug the USB DAC then playback works at normal speed. But if I want to fast-forward the song high speed playback is kept on until I unplug/plug the USB DAC.

The other workaround I found was to add these lines to .moc/config whenever I want to use my USB DAC.

ALSADevice = hw:2
ALSAMixer1 = PCM
ALSAMixer2 = Master

After applying these configuration fast-forward, volume control, etc. work just normal.

Update to the latest ubuntu version triggered this problem. The root lies in the interaction of the latest moc with pulseaudio. See https://bugs.archlinux.org/task/39186 for more information.

The temporary solution is to launch mocp with PULSE_LATENCY_MSEC=[any value, 30, 60, etc].

Also present in latest svn. I'd like this to be fixed, does any dev have access to a system with pulseaudio >= 5.0 (or perhaps 6, I'm running 6.0)?

Looking at the information provided, this seems to me to be a PulseAudio or PulseAudio/ALSA interaction problem. MOC doesn't yet have a PulseAudio sound driver, so it will be going through ALSA. There is no direct interaction of MOC with PulseAudio.