Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
XMMS playing music too fast!?!
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
ElCondor
Guru
Guru


Joined: 10 Apr 2002
Posts: 520
Location: Vienna, Austria, Europe

PostPosted: Thu Jun 06, 2002 9:00 am    Post subject: XMMS playing music too fast!?! Reply with quote

I wondered about the sound of the music being played by xmms. So I measured the time: eg "knocking on heavons door": real time: 5m35s, played by xmms in 5m06s :!:

how can this be :?: anyone experienced such a strange behavior of xmms??

I cannot use xmms in this state, everything is to high, sounds (ad least) strange, odd ... sick. Any suggestions? please!

* ElCondor pasa *
_________________
Here I am the victim of my own choices and I'm just starting!
Back to top
View user's profile Send private message
lx
Veteran
Veteran


Joined: 28 May 2002
Posts: 1012
Location: Netherlands

PostPosted: Thu Jun 06, 2002 9:08 am    Post subject: Reply with quote

Never checked, but maybe a bad mp3 / wrong time measurment. Well I will check with some files I have on cd and converted to mp3..... well pretty in synch, couldn't check exactly, pretty difficult starting them at the same time. Well maybe its got something to do with /dev/rtc or sound driver / xmms not using correct timing or playing a 44.1Khz file at 48Khz without converting but this gives a greater difference. Gonna check with a longer file...
_________________
"Remember there's a big difference between kneeling down and bending over.", Frank Zappa


Last edited by lx on Thu Jun 06, 2002 9:16 am; edited 1 time in total
Back to top
View user's profile Send private message
ElCondor
Guru
Guru


Joined: 10 Apr 2002
Posts: 520
Location: Vienna, Austria, Europe

PostPosted: Thu Jun 06, 2002 9:15 am    Post subject: Reply with quote

I measured several mp3s to be sure it's not a single one broken, i just named the above one as an example. I will play around a little bit more to find out if its always the same speed or if it varies, but it's strange anyway.

* ElCondor pasa *
_________________
Here I am the victim of my own choices and I'm just starting!
Back to top
View user's profile Send private message
lx
Veteran
Veteran


Joined: 28 May 2002
Posts: 1012
Location: Netherlands

PostPosted: Thu Jun 06, 2002 9:27 am    Post subject: Reply with quote

Well I used a file of 5:26 and they kept completly in sync sound (have button on amplifier, that allows quick switching) clock of xmms and cdplayer also stayed in sync, so can't be more than a few millis. I'm using alsa driver (sblive value, emu10k1). using the OSS driver of xmms. Should try playing a wave file also, so you can check if the cause is the playing of audio or the conversion from mp3 to pcm. The later seems not likely to me, no timing issues. So think its caused because the audio ain't played at the right speed (can be driver / soundprocessor (arts / esd) / or even soundcard issue), but well I just can say it works fine here.

Cya lX.
_________________
"Remember there's a big difference between kneeling down and bending over.", Frank Zappa
Back to top
View user's profile Send private message
WildBill
n00b
n00b


Joined: 03 May 2002
Posts: 20

PostPosted: Mon Jun 17, 2002 5:43 pm    Post subject: Reply with quote

I'd check the encoding of the mp3. If the mp3 was recorded with a variable bitrate rather than a static bitrate (say, if you used LAME with the --r3mix command line option) then the mp3 was encoded with a variable bit rate. Since all xmms does is do a simple calculation (filesize * bitrate=length of tune) (I think...) then the length of the tune will be off because the bitrate fluctuates depending on what's going on in the song at that time.

I recently re-encoded all my CDs with LAME and noticed this behavior in WinAmp and XMMS.
Back to top
View user's profile Send private message
n0n
Guru
Guru


Joined: 13 Jun 2002
Posts: 355

PostPosted: Mon Jun 17, 2002 6:24 pm    Post subject: Reply with quote

My laptop has this weird AC'97 chipset for audio, and the OSS driver for Linux that understood the sound card could only sample at 48KHz, and not every program could speak that frequency. I believe the module I was using was something like "i810_audio" . . . Like, XMMS couldn't deal with 48KHz, but ESD could, so if I set up XMMS to use ESD, then things were fine. However, when loading the OSS module for the card, you could specify sample rates, so for a time I tried setting the sampling rate by hand to 44100, which would allow things like XMMS to use the soundcard without going through ESD. The problem there was that the sound was played faster, much like you describe. If you were familiar with the music being played, it was noticeably "higher," too.

The ALSA driver for the card worked fine (plus the OSS emulation in 0.9.x, too), using "intel8x0" . . . If your situation is similar to mine, then I'd recommend trying out ALSA instead of the OSS drivers that still come with the 2.4 kernel series.
Back to top
View user's profile Send private message
delta407
Bodhisattva
Bodhisattva


Joined: 23 Apr 2002
Posts: 2876
Location: Chicago, IL

PostPosted: Mon Jun 17, 2002 6:27 pm    Post subject: Reply with quote

It does definitely sound like a sample rate issue, try using different output plugins.
Back to top
View user's profile Send private message
n0n
Guru
Guru


Joined: 13 Jun 2002
Posts: 355

PostPosted: Mon Jun 17, 2002 6:29 pm    Post subject: Reply with quote

Yeah, I just checked, and I still have it (commented out, though) in my /etc/modules (this was on Debian, it'd be /etc/modules.autoload under Gentoo) and I had this line:
Code:
i810_audio clocking=44100

Without that "clocking" in there, the sound would be fine but programs that couldn't speak 48KHz wouldn't be able to use sound, and *with* that setting, the sound would be speeded up. Again, I'd recommend going with ALSA.
Back to top
View user's profile Send private message
alec
Apprentice
Apprentice


Joined: 19 Apr 2002
Posts: 270
Location: Here

PostPosted: Mon Jun 17, 2002 8:48 pm    Post subject: Reply with quote

What have I told all of you about optimizing xmms? You don't want a faster performance!




hmm.. i'll go back to my cave of lameness...
Back to top
View user's profile Send private message
ElCondor
Guru
Guru


Joined: 10 Apr 2002
Posts: 520
Location: Vienna, Austria, Europe

PostPosted: Tue Jun 18, 2002 9:40 am    Post subject: Reply with quote

n0n: the problem is on my laptop with a AC97 sound (intel chipset). I tried mpg123 in the meantime which complains about no supported rate found. looks like the 48kHz theory might be right here :)
I will try ALSA today, I hope that it's easier and better to use - last time I tried (about 18 months ago) it was quite .. strange

Report will follow ;)

* ElCondor pasa *
_________________
Here I am the victim of my own choices and I'm just starting!
Back to top
View user's profile Send private message
n0n
Guru
Guru


Joined: 13 Jun 2002
Posts: 355

PostPosted: Tue Jun 18, 2002 4:22 pm    Post subject: Reply with quote

Cool . . . ALSA is still a little strange, but if you follow the installation docs properly, things seem to work out all right. I'd definitely recommend going with the 0.9.x line instead of 0.5.x, because the OSS emulation is (evidentally) much better in 0.9.x. This means that you can still use all the OSS-aware sound programs out there. Note that emulation doesn't work in all cases. Like Quake 3 totally bombs out if I try to use it w/ my laptop's sound (if I disable sound, it works all right). But most everything else I've tried works well.

If you need help setting it up, I could post some snips from my config files. If you end up using the same module as I did, then things should be pretty similar. What kind of laptop, btw? Mine's a Fujitsu E-series . . .
Back to top
View user's profile Send private message
ElCondor
Guru
Guru


Joined: 10 Apr 2002
Posts: 520
Location: Vienna, Austria, Europe

PostPosted: Wed Jun 19, 2002 9:34 am    Post subject: Reply with quote

n0n, could you please email me? I haven't got a clue how to install an configure alsa .. may it's just a bad week (like the broken water-pipe in the floor above me flooding my WC ...) or it's to hot here in vienna (>30°C) ..

PS: Sony Vaio GRX316

* ElCondor pasa *
_________________
Here I am the victim of my own choices and I'm just starting!
Back to top
View user's profile Send private message
n0n
Guru
Guru


Joined: 13 Jun 2002
Posts: 355

PostPosted: Wed Jun 19, 2002 4:42 pm    Post subject: Reply with quote

Can do, expect it shortly . . . Please note also that I've only installed ALSA by hand. I've never gone through Gentoo's "emerge" process to do it, as my Gentoo box has a sound card whose OSS drivers are plenty good enough.
Back to top
View user's profile Send private message
n0n
Guru
Guru


Joined: 13 Jun 2002
Posts: 355

PostPosted: Wed Jun 19, 2002 5:06 pm    Post subject: Reply with quote

In the interests of the public good, I figured I should be a good citizen and post my email here, too, in case anyone else needs to know. So what follows is my email, prettied up a bit for the board. :)

Okay, first off, I've only installed ALSA by hand, on my Debian system at work. My home PC, where I've got Gentoo running, can use the OSS drivers just fine, so I don't know how the emerge process would go. I suspect you could just do "emerge alsa" and have things work, but here's what I did, anyway.

First, download the 0.9.0rc1 files from alsa-project.org. Then install alsa-driver first. Untar the package. Good instructions can be found in the 'INSTALL' file in the package. Here's what I used to compile:

Code:
     ./configure --with-isapnp=yes --with-sequencer=yes \
                 --with-oss=yes --with-cards=intel8x0 && make \
                 && make install


Note that I specified "intel8x0" for the cards to compile, because that's the only one I needed. To do all of them, specify "all" instaed. Or, if intel8x0 isn't the right one for you, feel free to substitute. "./configure --help" will give a complete list. Also note that the "make install" bit won't work if you're not root.

Then run "./snddevices" like the INSTALL file says, unless you've got DevFS, which you probably do because you're running Gentoo, so never mind. :)

Then edit /etc/modules.conf to add in the ALSA stuff. Again, this is described in the INSTALL section, but this is what worked for me:

Code:
alias char-major-116    snd
alias char-major-14     soundcore
alias snd-card-0        snd-card-intel8x0
alias sound-slot-0      snd-card-0
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12        snd-pcm-oss


Then "modprobe snd-intel8x0" to load the module. When you reboot, the stuff in modules.conf should do that automatically, but this way you don't have to reboot to get it running.

Then I installed alsa-lib, alsa-oss, and alsa-utils. I didn't install alsa-tools; don't ask me why. It's just not installed. :) These were all simple "./configure && make && make install" deals.

And that was it . . . Again, "emerge alsa" should probably do it on Gentoo, but if you wanted to do it by hand, that should do it.
Back to top
View user's profile Send private message
n0n
Guru
Guru


Joined: 13 Jun 2002
Posts: 355

PostPosted: Wed Jun 19, 2002 5:32 pm    Post subject: Reply with quote

Oh, one more thing . . . If you just edit "modules.conf" to add those things, you'll likely have them get overwritten at some point. So you'd best add them into a file in /etc/modules.d so that it'll get updated. I forget the command that actually does that, though . . .

Also, you're going to want to make sure that you've got all the sound stuff defined as a module in your Kernel configuration; otherwise some of the things in /etc/modules.conf might not work out correctly.
Back to top
View user's profile Send private message
furrythugs
n00b
n00b


Joined: 08 May 2002
Posts: 6
Location: Phoenix

PostPosted: Fri Jun 21, 2002 9:27 am    Post subject: Haven't read all responses yet, But... Reply with quote

I always used to have this problem. You may have enabled the "Disk Writer" plugin ? If so this plays your mp3's at the same speed it takes your computer to convert an mp3 to a wav file. (i.e faster than you can listen to it). Try disabling the disk writer. It's Options>Preferences>Audio IO Plugins. Select Output Plugin to be your Output device that YOU can listen to.

If this isn't your problem I take 2 steps back .....
Back to top
View user's profile Send private message
ElCondor
Guru
Guru


Joined: 10 Apr 2002
Posts: 520
Location: Vienna, Austria, Europe

PostPosted: Fri Jun 28, 2002 8:31 am    Post subject: Reply with quote

New week, new chance :)
so, it's definitely the 48<>44.1 kHz problem. loading the i8x0 module with clocking=44100 and/or ftsodell=1 didn't change playback speed. so I emerged alsa, it says it builds "all" modules, but where to? cannot find it!

I tried kernel 2.5.24 with the build-in alsa drivers, then everything is played at the right speed, exept for videos with other sound-rates, which all get resampled to 1000Hz - i have not found out how to change that behaviour yet. (I cannot user 2.5.24 currently, because evolution makes my X freeze with that kernel)

the story continues ...

* ElCondor pasa *
_________________
Here I am the victim of my own choices and I'm just starting!
Back to top
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Wed Aug 21, 2002 9:47 am    Post subject: Reply with quote

Fled the crowds in Desktop Environments for the wide open spaces of the new Multimedia forum.
_________________
For every higher wall, there is a taller ladder
Back to top
View user's profile Send private message
Lemma
Guru
Guru


Joined: 19 Apr 2002
Posts: 416
Location: Uppsala, Sweden

PostPosted: Mon Jan 13, 2003 8:47 am    Post subject: Reply with quote

I have this problem too, and it is not due to 44-48kHz; xmms is playing close to x2 or more... I have checked the output-plugin too, and it is (and have always been) set to OSS 1.2.7. I have tried to erase all the conf-files and reemerge xmms, the present and the oldest but nothing... It was workning fine until today, yestarday I emerged winex and took it away again, but that should have nothing to do with it... Please, as of now, i can't play music at work and I have to have musik to work properly, help ! ! !
_________________
Always make it as simple as possible, but no simpler
/Einstein
Back to top
View user's profile Send private message
Lemma
Guru
Guru


Joined: 19 Apr 2002
Posts: 416
Location: Uppsala, Sweden

PostPosted: Mon Jan 13, 2003 10:35 am    Post subject: Reply with quote

To add to the confusion, if I use 3dblaster, the speed of the music is as it should (and 3dblaster also uses OSS... Well, now I can listen to my music, but I don't like loose ends and I don't like 3dblaster...
_________________
Always make it as simple as possible, but no simpler
/Einstein
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum