Ok, something even weirder is happening now. I use this computer with smplayer to play video files in my TV through a HDMI cable. All the problems I was experiencing where happening without the cable and using the built-in audio output. I've just tried plugging the HDMI cable, changed the output to the HDMI audio channel and with the HDMI cable it was working fine with any configuration!!!
So I went back to the built-in output without the HDMI cable to see what the problem was and now I can't reproduce the problem at all, everything works again with any settings in audio or video. Does this make any sense?