Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[win32] AE: change default sink to DirectSound (over WASAPI) #1826

Merged
merged 1 commit into from Nov 22, 2012

Conversation

Montellese
Copy link
Member

This changes the default audio output sink on win32 from WASAPI to DirectSound as a lot of Frodo Beta 1 users have reported problems after updating from Eden (see e.g. http://forum.xbmc.org/showthread.php?tid=145239&pid=1241534#pid1241534). For some of them WASAPI didn't work at all and for some of them changing to DirectSound and back to WASAPI solved their issues. But for all that reported back after my suggestion to DirectSound, that at least worked (see http://forum.xbmc.org/showthread.php?tid=145239&pid=1241567#pid1241567 which is the same user as in the link above).

So there's certainly an issue somewhere in the WASAPI code but I don't know anything about that and IMO it is more important to have a default value that works for everyone than to have a default value that provides more features but causes problems.

@da-anda
Copy link
Member

da-anda commented Nov 21, 2012

WASAPI requires enabled exclusive mode for the audio device. If it's disabled, playback is choppy at low framerate. But IIRC DirectSound has also some disadvantages @DDDamian ?

@DDDamian
Copy link
Contributor

@da-anda @Montellese - WASAPI does require exclusive mode to be enabled. If it is not enabled in the windows audio panel we pop a kaitoast stating we could not initialize the audio device. Any time video is played without a valid audio device playback is slow and choppy as Da-anda states. Unfortunately there is no programmatic way to change the exclusive-mode setting - it must be user-initiated.

DS devices are always enumerated. WASAPI only on Vista SP1 and higher as thats the earliest version supporting it. XP/2000/ME/Server support only DS

DS has many disadvantages audio-wise (forced resampling, negligible passthrough support, performance). That said, until we inject better logic further into the code, the choice between an unplayable initial setup or better features is a clear one.

I have a branch re-instating the "Default" audio device which in Win is almost fool-proof, but that's for post-Frodo.

Green light from me.

@DDDamian
Copy link
Contributor

FYI - I haven't checked the thread yet, but I suspect the issue described stems from the fact that Eden used the device friendly-name when saving the device string. The "proper" method now used uses the GUID of the device - preferred by MS as it is always unique. Someone transitioning will need to select their device once.

That plus the growing use of removable USB audio devices is what prompted a Default fallback device as mentioned above, but like most of our work since merge it's in another repo which would be very hard to back-port from :(

@wsoltys
Copy link

wsoltys commented Nov 22, 2012

+1

DDDamian added a commit that referenced this pull request Nov 22, 2012
[win32] AE: change default sink to DirectSound (over WASAPI)
@DDDamian DDDamian merged commit 61f39b0 into xbmc:master Nov 22, 2012
@Montellese
Copy link
Member Author

@DDDamian: Yeah I have seen the change from using the user-friendly sink name to the UID. Unfortunately matching the user-friendly name from AE against the user-friendly name used by Eden (and stored in guisettings.xml) doesn't work as they differ ("WASAPI: ..." in Frodo vs "wasapi:..." in Eden, so they have different cases and different spacing).

@DDDamian
Copy link
Contributor

@Montellese - heh, that also explains why some users were seeing a bug in Eden code where crossfade was greyed out using "wasapi:xxx" and I wasn't using "WASAPI:_xxx"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFC PR submitted for gathering feedback Type: Improvement non-breaking change which improves existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants