It's an older PC, a P4 I use as a radio streamer mostly, so the install is x86.
The problem is, audio seems to play back faster. I have it set up to boot up the streaming application after boot (Tuner, about 20 seconds after boot since it uses a spinning IDE HDD, so the rig is slow on boot) and sometimes (rarely) everything will be fine, the playback speed will be fine. But, most of the time, the audio plays back faster. In some rare cases, I've also noticed it can play slower as well. Also, if the audio is fine after Tuner starts and you change radio streams, back to square one, it starts playing the audio faster.
I tried running other applications, like VLC and Audacious to see if the same thing is happening in them. Yep, the same thing. I still haven't tried Winamp with wine.
I still use PulseAudio on that rig. I didn't see a reason to switch since it did it's job, I don't really need anything fancy on it, just a workable audio out was all I needed.
Also, I have no idea when this actually started happening (everything worked fine when I set it up a few years ago, 1.5 or 2 years ago I think) since I haven't used it in a while as a streamer, but I needed to use it now. I thought it might be a kernel/driver bug, so I rolled back a snapshot a few months ago (I think a snapshot that still had some 5.x version of the kernel), and it did kinda work (the fast playback speeds were less sporadic) but it didn't eliminate the problem completely.
Please, tell me what commands to run on this thing, I'll do it and post the output. It uses an onboard audio card, some old Intel card part of the chipset I think. Here is the output from lspci regarding the audio.
Multimedia audio controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 01)
I'm thinking PulseAudio is so outdated now that it causes problems like these on certain chipsets/audio controllers, but I'm not sure. I know I'll have to eventually switch to PipeWire, but I was hoping I could ride the PulseAudio train a little longer.
Sounds to me like maybe the sample rate is changing away from what your application expects (44.1 vs. 48 kHz). I used to have this problem with Pulse quite often, but I don't remember if I fixed it before switching to PipeWire.
Pulse has a "preferred sample rate" setting in its config files, but it seems to only really be a suggestion, and Pulse tends to ignore it.
OK, I think I solved it :). Just needed to manually set some parameters in
/etc/pulse/daemon.conf
.I think defining the default and alternative sample rate mostly solved the problem, the other settings were just in case, I didn't check if it worked with or without them.
So, how do I force it to use a particular sample rate? Cuz I think the streams are 44.1KHz (as is with most audio) and if it speeds up, the sample rate should be set to 48KHz if my logic serves me correctly.
This is just a temporary fix, I'll switch to PipeWire as soon as I can, I just wanna do some work in my workshop and listen to music...