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: v1.5.0 beta 20: playback freezes after playing a sound in exclusive mode (Read 1321 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

v1.5.0 beta 20: playback freezes after playing a sound in exclusive mode

Playback freezes after playing a sound in exclusive mode from another program, but foobar2000 displays like it is playing something (but time is not going, and visualization just wobbles a bit). It is similar to this old issue after using RDP.

It is easy to reproduce:
0. Don't forget to allow exclusive mode for your sound device.
1. Start playing some music in foobar2000.
2. Use this program to play a sound in exclusive mode:
Code: [Select]
play-exclusive --file chimes.wav
3. After playing the sound is finished, the foobar2000 is stuck forever until you press "Stop" and "Play" buttons.

I guess that expected behavior should be like this: whenever something prevents foobar2000 from playing, it just pauses itself, so it should be visible that it is paused.

Re: v1.5.0 beta 20: playback freezes after playing a sound in exclusive mode

Reply #1
Seems like foobar2000 just doesn't handle OnSessionDisconnected WASAPI event properly. It also happens when I'm listening to music on a remote machine through RDP, then press "Pause", disconnect, connect again, press "Play", and it tries to play, but can't, it's stuck, until I press "Stop" and "Play".

 

Re: v1.5.0 beta 20: playback freezes after playing a sound in exclusive mode

Reply #2
Thanks for the report.

I am aware of these issues and have been unsuccessfully trying to address them. My last attempt of refactoring of DirectSound code resulted in other stability problems for some other users.

I'm afraid that for now you'll have to live with this issue for a while. Unless it brings down the whole foobar2000 application in some scenario (as far as I know it currently does not), then please say so and post appropriate reports / minidumps.

It would appear that DirectSound is considered legacy technology by Microsoft. I am planning to get rid of DirectSound use in foobar2000 v1.6, in favor of WASAPI shared mode. All of these problems will be then addressed.

In meanwhile, I recommend that you try foo_out_wasapis : https://www.foobar2000.org/components/view/foo_out_wasapis - it's already available, well-tested and actively maintained.
Microsoft Windows: We can't script here, this is bat country.

Re: v1.5.0 beta 20: playback freezes after playing a sound in exclusive mode

Reply #3
Oh, for some reason, I thought that foobar2000 already uses WASAPI for output by default =) OK, it's not urgent anyway. Just wanted to make sure that you know about an easy way to reproduce the issue using playing a sound in exclusive mode.

Re: v1.5.0 beta 20: playback freezes after playing a sound in exclusive mode

Reply #4
In meanwhile, I recommend that you try foo_out_wasapis : https://www.foobar2000.org/components/view/foo_out_wasapis - it's already available, well-tested and actively maintained.
Thanks for the Heads Up. I didn't understand the reason for shared WASAPI before. After a one time volume adjustment in the Windows mixer (to 100%) it works fine and ready for the future.
In theory, there is no difference between theory and practice. In practice there is.