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: output process_samples gets junk (?) data on track change (Read 1183 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

output process_samples gets junk (?) data on track change

I am trying to write an output component but am getting confused, I wonder if anyone could help..

If I pause a track, pause() is called and then calls to process_samples() stop.
When I play a new track flush_changing_track() is called, then pause(false) is called to 'play' the new track, and then samples start getting delivered to process_samples() again, but the first few are from the previous track. This means I hear a fraction of a second of the previous track before the new track plays. I can't see any way I can identify these samples as being from the previous track or flush whatever buffer they are coming from, as they are requested and delivered after flush_changing_track(), maybe I am missing something?

Re: output process_samples gets junk (?) data on track change

Reply #1
Did you enable Smooth Seeking/Pause/Volume changes in Output settings? That enables a slight crossfade, which is implemented immediately prior to the actual output.

Re: output process_samples gets junk (?) data on track change

Reply #2
I haven't. This is the fading options with a configuration UI that is at the bottom of the Output page in preferences? Actually I can't work out how to enable that for my output implementation, none of the configuration methods seem to enable it

Re: output process_samples gets junk (?) data on track change

Reply #3
Ahh I have figured this out, my bad. Actually the buffering of the previous track is happening totally outside of foobar or my code, in the receiver for the output data I am sending. So this problem isn't a real thing.

I'm still interested about the fading options though - are those available to components using the SDK, or implemented in Peter's output components separately?

 

Re: output process_samples gets junk (?) data on track change

Reply #4
The reason I couldn't see the fading settings is because they are new in 1.6 beta. It's working now, thank you.