Skip to main content

Topic: Buffer content loops on stop/pause when playing via AirFoil/AirPlay (Read 3838 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • Copland
  • [*]
Buffer content loops on stop/pause when playing via AirFoil/AirPlay
Using fb2k 1.16 with AirFoil/Apple AirPlay via the DS primary sound driver (which ist an internal Realtek HD soundcard), the buffer content (50 ms or higher, whichever length I set it to) keeps repeating after stop/pause/next etc. Loops continue until fb2k is terminated. AirFoil engineers blame foobar. Quote: "Unfortunately this problem is caused by how Foobar handles stopping. It appears to leave the last bit of audio in the sound buffer rather than clearing it out. This causes the loop that your hearing."

I'm using fb2k on a 32bit win xp system. Kernel streaming or ASIO are not supported by Airfoil. Can anybody help?


  • Vkleber
  • [*]
Buffer content loops on stop/pause when playing via AirFoil/AirPlay
Reply #1
Hi,

I have exactly the same problem: when I stream my flac-files with Airfoil (newest version) after a "stop" or "pause" fb2k remains in  a loop, playing the last song on and on, as if the buffer is not emptied. I have asked support with airfoil but they claim that this must be a problem of fb2k, not emptying the buffer. Can anyone help, because this is really the BEST player for FLAC!

Volker from Berlin
  • Last Edit: 12 March, 2012, 02:13:34 PM by Vkleber

  • kode54
  • [*][*][*][*][*]
  • Administrator
Buffer content loops on stop/pause when playing via AirFoil/AirPlay
Reply #2
foobar2000 does not empty the buffer by design. It pauses the buffer. And if you have fading enabled for pauses, it also precedes the pause with ramping the buffer's volume down to zero, stepping every 10 milliseconds. So there you have two processes which should silence the output. Pausing and volume adjustment.

Emptying the buffer is not exactly feasible, since the buffer contains the entire output latency of the player. It would need to be cleared completely, then stopped and released. All because one DirectSound hook does not implement pausing and/or silencing a buffer. And then on every unpause, it would need to refill that output buffer with the data that was discarded. That would require either seeking backward and playing up to the current position again, or buffering that data outside of the sound output driver for just such an occasion.

  • Vkleber
  • [*]
Buffer content loops on stop/pause when playing via AirFoil/AirPlay
Reply #3
Well, this all sounds pretty reasonable  - but it does not solve our problem, especially as this behaviour ONLY occurs together with fb2k and airfoil - and not with other players. So, do you have any idea, perhaps according to the settings in fb2k?

  • Vkleber
  • [*]
Buffer content loops on stop/pause when playing via AirFoil/AirPlay
Reply #4
Well, after trying out several possibilities I finally noticed that this behaviour must have to do with some functions (???) in Windows XP. Under Windows 7 the problems do not exist anymore! Good luck! Just another question: Are there any recommendations according to play FLAC-files with fb2k, like "output" (I choosed just primary sound) and / or "dsp" (I choosed nothing)?

  • kode54
  • [*][*][*][*][*]
  • Administrator
Buffer content loops on stop/pause when playing via AirFoil/AirPlay
Reply #5
Do those other players allow hardware mixing with their DirectSound output? I only ask this because it may matter if the AirWhatsis you're posting about forwards the hooked DirectSound output back to the operating system, so you get local sound output as well as remote. If it fails with hardware mixing, it sounds like they may not be forwarding or handling all DirectSound interface class functions, or at least not forwarding all of them properly.

Where is the looping occurring? On the host system, or on the AirPlay device?

  • Vkleber
  • [*]
Buffer content loops on stop/pause when playing via AirFoil/AirPlay
Reply #6
Do those other players allow hardware mixing with their DirectSound output? I only ask this because it may matter if the AirWhatsis you're posting about forwards the hooked DirectSound output back to the operating system, so you get local sound output as well as remote. If it fails with hardware mixing, it sounds like they may not be forwarding or handling all DirectSound interface class functions, or at least not forwarding all of them properly.

Where is the looping occurring? On the host system, or on the AirPlay device?


Sorry for the late answer. The loop is (still) occuring only on the AirPlay device - not on the house system. Any idea?