Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Foobar randomly skips tracks (Read 830 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Foobar randomly skips tracks

Hello. I've been having a problem with foobar2k, but I am not able to reproduce it consistently so I will simply describe what happened. I can't point out any specific version, I've switched between 64-bit and 32-bit and generally try to use the latest.

In the last few months I've been occasionally idly playing tracks with foobar. The first time I noticed something wrong was when I loaded a 4-hour playlist, but it stopped playing after only 2 hours and 30 minutes had passed. After I had a couple more playlists ending prematurely I started paying attention to see what it was doing and eventually heard how it finished playing one track and skipped to another one a few tracks down. This occurred a few more times with me either resigning to not listening to the skipped tracks or trying to remember which one last played so I could rewind back to what should have been the next.

I tried looking online for similar situations and couldn't come up with anything. I checked foobar's log and didn't see any error such as "File corrupted or not found" in relation to the skipped tracks. The files I am trying to play are an assortment of .mp3s, .mkv videos and some .opus that I converted through foobar from lossless sources.

In frustration, I set all the buffers in foobar to the maximum amount, added some 150 hours to a playlist and played it on shuffle, thinking this way I wouldn't know if it skipped anything. I was wrong. Yesterday, it finished playing one track, played about one second from the middle of a different track, then skipped again to another track that it played normally from the start. That pushed me past the breaking point so I'm asking for help here.

I think it's reasonable to believe that foobar wouldn't have its good reputation if it failed at something as fundamental as playing every track in a playlist under normal circumstances. In conclusion, I must assume I messed up something in my configuration that causes this behavior to infrequently occur. What can I do to fix this?

Re: Foobar randomly skips tracks

Reply #1
You don't mention if you have third party components installed. There are various components specifically designed to skip track, for example Skip Track.

Other possible explanation is that you have some program or hardware sending commands to foobar2000. These forums have at least documented instances of (broken) keyboards and headsets sending unwanted media control commands.

You could as a test try disabling Preferences -> Advanced -> Tools -> Process system media key events. That way foobar2000 won't react to standard multimedia controls.

Re: Foobar randomly skips tracks

Reply #2
You don't mention if you have third party components installed. There are various components specifically designed to skip track, for example Skip Track.

Other possible explanation is that you have some program or hardware sending commands to foobar2000. These forums have at least documented instances of (broken) keyboards and headsets sending unwanted media control commands.

You could as a test try disabling Preferences -> Advanced -> Tools -> Process system media key events. That way foobar2000 won't react to standard multimedia controls.

I have installed SqrSoft Compressor and components for decoding OptimFROG, TAK and TTA. All the other I have were included with foobar.

I am aware of media controls, my keyboard has Fn+F5-F8 act as Previous, Play/Pause, Stop and Next, and I manually bound the Pause key to Play/Pause. However, this explanation seems unlikely because I use multiple players with media controls, such as VLC, MPV and MPC-HC and didn't have any problems with them in this regard.

I also know that I need to have only one player running if I want to make sure it is the one receiving the inputs from media keys. With more players open I cannot select which one to control.

Funnily enough, I tried disabling "Process system media key events", restarted foobar, and it was still reacting to media keys. Disabling the "Process browse key events" seems to work fine, however.

Is there any debug or configuration file I can send here that could help solve my issue? Or I could record my screen and try to catch the moment foobar skips over some tracks. At least to prove myself that I'm not just going insane.

Re: Foobar randomly skips tracks

Reply #3
My mistake, I relied on my memory about the "Process system media key events" option. That option is effectively meaningless when universal volume control integration is enabled.
The option you disabled, "Process browse key events", affects the extra navigation buttons in the mouse. I wouldn't expect them to be a problem for you as they only have an effect when pressed inside foobar2000 window.
To disable the media key controls you need to disable both the "Process system media key events" and "Advanced Preferences" -> "Display" -> "Integrate with Windows Universal volume Control".

I wrote a quick and simple debug component that hopefully helps in finding out what goes wrong. You can download it here: https://foobar.hyv.fi/foo_playevents_debug.fb2k-component.

It tries to sniff command line parameters and it keeps track of playback progress. If foobar2000 is controlled by outside program using command line parameters, it tries to report the given commands. And if track isn't fully played it reports some details about that.
Everything is printed to foobar2000 console starting with string "PlayEvent ***:".

Note that the command line sniffing doesn't always work. foobar2000 randomizes the order at which services are registered and if the actual command handler gets called before the debug component, the component won't see the action anymore.

You could see something like this:
Code: [Select]
PlayEvent ***: Command line parameter: /next
PlayEvent ***: on_playback_starting: track_command_next
PlayEvent ***: starting a new track before previous track finished. Played 0:04.000 / 1:15.960 of track: file://G:\Storage\test tracks\NativeDSD Music Starter Pack - NDSD017\DSD 256fs - 5ch\02. Shostakovich_Symphony no. 5 in D minor - Allegretto - excerpt (from FR724SACD) DSD 256fs - 5ch.dsf