How to stop Spotify on Linux audio skipping
Spotify is a great application that lets you listen to any music they have (there’s an incredible amount on there) with the odd, almost unnoticable, advert thrown in to pay for the service. It works on windows or mac, but there is no native binaries for linux. Thankfully spotify for windows works under wine just fine - hooray.
However I found that the audio wasn’t great - for me it would skip like a CD skips every few seconds - if it was a CD I would just clean it and throw it in the bin. The reason for this behaviour is found in wine’s audio config - I won’t go into the real reason why, but it is to do with the driver and daemon, etc. Other people have had problems with distortion or just no audio at all.
The solution if you have this problem is to start all your wine commands with padsp and make sure the OSS audio driver is selected. First start winecfg like this:
padsp winecfg
Then go to Audio, find the OSS driver and select that (and unselect anything else selected), hit OK, etc.. Now start your wine apps (inc spotify) like this:
padsp wine "C:\Program Files\Spotify\spotify.exe"
And now my spotify is working just fine!
Related posts
Ubuntu: Ctrl-C no longer works in terminal
Three million hit by Windows worm
How to strip iTunes DRM from your music files
Linux: Bash Scripting: Search Bash History
Trash rather than rm
March 26th, 2009 at 6:06 am
Thanks!!!!!
My hiccups in the sound dissapeared.
March 26th, 2009 at 4:24 pm
Nice one! :)
My skips seem to have resolved themselves, but definitely worth nothing.
Cool blog btw, added your RSS feed to my Google Reader.
March 29th, 2009 at 2:27 pm
thanks a lot! fixed my problems with spotify!
April 5th, 2009 at 7:36 am
Thanks a lot! :D
April 18th, 2009 at 8:08 am
Worked for me - the sound on Spotify was really jumpy until I tried this. Now it’s fine unless my poor old processor’s completely overloaded.
Thanks.
May 17th, 2009 at 4:01 pm
You could also create a .asoundrc file (in Ubuntu) then open it with a text editor and type the text below (pcm.! … etc.). Then put that file in your home folder and the sound should be perfect:
pcm.!default
{
type plug;
slave
{
pcm “hw:0,0″;
buffer_size 8192;
period_size 2048
}
}
July 17th, 2009 at 12:54 am
Thanks mate! Works like a charm. You stoped me from reinstalling winXP!!
July 30th, 2009 at 7:37 am
Thank you!
Now I’ll go to find out how to edit my kde4 menu :-)
July 30th, 2009 at 7:53 am
Fixed it!
opened the spotify.desktop file that i found in /home/xxxx/.local/share/applications/wine/Programmer in a text editor (Programmer is in Norwegian, different for other languages).
I changed the line
Exec=env WINEPREFIX=”/home/xxxx/.wine” wine “C:\\Programfiler\\Spotify\\spotify.exe”
to
Exec=env WINEPREFIX=”/home/aril/.wine” padsp wine “C:\\Programfiler\\Spotify\\spotify.exe”
Now i can start it straight from the menu. :-)
July 30th, 2009 at 7:54 am
ofcourse not changed to aril… please edit, Mr. Parkins. I’m sorry.
August 8th, 2009 at 9:46 pm
If you are testing/using the Karmic, you can now sort the problem properly.
See http://www.3spoken.co.uk/2009/08/making-wine-sound-work-with-pulseaudio.html
August 29th, 2009 at 12:18 pm
Thanks a lot, your awesome!
October 30th, 2009 at 5:07 am
Thank you! Worked.
November 16th, 2009 at 12:28 pm
Thank you so much! Works perfectly!
December 14th, 2009 at 12:54 am
Thank you, worked perfectly.
December 23rd, 2009 at 3:53 pm
Thanks, this was the last thing that my sister needed Windows for.
December 28th, 2009 at 10:31 am
The Esound driver works a treat too!
January 4th, 2010 at 6:57 am
good man, works a treat.
January 29th, 2010 at 6:11 am
Excellent. Was just about to remove spotify.
February 5th, 2010 at 5:09 pm
Thanks for the excellent tip! Spotify now works like a charm!
February 27th, 2010 at 7:55 am
Great fix! Thanks.