summaryrefslogtreecommitdiffstats
path: root/audio/out/ao_wasapi.c
Commit message (Collapse)AuthorAgeFilesLines
* ao_wasapi: Fix S/PDIF passthrough initDiogo Franco (Kovensky)2013-07-221-3/+4
| | | | | | | | | | MSDN tells me to multiply the samplerates by 4 (for setting up the S/PDIF signal frequency), but doesn't mention that I'm only supposed to do it on the new, NT6.1+ IEC 61937 structs. Works on my Realtek Digital Output, but as I can't connect any hardware to it I can't hear the result. Also, always ask for little-endian AC3. I'm not sure if this is supposed to be LE or NE, but Windows is LE on all platforms, so we go with LE.
* ao_wasapi: Log the passthrough format in MSGL_VDiogo Franco (Kovensky)2013-07-221-0/+5
|
* ao_wasapi: Also do passthrough for AF_FORMAT_MPEG2Diogo Franco (Kovensky)2013-07-221-1/+1
| | | | That's the sample format ad_spdif uses when the source is MP3.
* ao_wasapi: Support S/PDIF passthroughDiogo Franco (Kovensky)2013-07-221-0/+45
| | | | | | | Entirely untested as this troper has no S/PDIF hardware. Refuses trying any other format if we can't use passthrough, or we would end up sending white noise at the user.
* ao_wasapi: Fix double free on uninitDiogo Franco (Kovensky)2013-07-221-2/+0
| | | | | Caused by incorrect conversion to the m_option API: since we don't allocate the state ourselves, we also don't free it ourselves.
* ao_wasapi: Support loading devices by nameDiogo Franco (Kovensky)2013-07-221-17/+65
| | | | | | | | | Do an strstr match against the device description and, if we have only a single match, take it. This works as long as the devices in the system don't change, but it's not supposed to be reliable; if one wants reliability, one uses the device ID string. Formatting.
* ao_wasapi: Don't search for devices as part of validationDiogo Franco (Kovensky)2013-07-221-23/+6
| | | | | | | | | | | This could turn valid parameters into syntax errors by the mere presence or abscence of a device (e.g. USB audio devices), so don't do that. We do validate that, if the parameter is an integer, it is not negative. We also respond to the "help" parameter, which does the same as the "list" suboption but exits after listing. Demote the validation logging to MSGL_DBG2.
* ao_wasapi: Change function macros to require semicolon after invocationDiogo Franco (Kovensky)2013-07-221-29/+29
| | | | Add semicolons where they were missing.
* ao_wasapi: Use OPT_STRING_VALIDATE for device suboptionDiogo Franco (Kovensky)2013-07-221-22/+82
| | | | | | | | | | | | | | | | | Validates by trying to pick the device using the device enumerator and aborting with out of range on failure. Refactors find_and_load_device to not use the wasapi_state; it might be called during validation. Adds missing CoInitialize/CoUninitialize calls. Remove unused variables (the SAFE_RELEASE macros keep them referenced so compiler warnings don't help finding them...). Remove the IMMDeviceEnumerator from the wasapi_state, it's only needed during initialization and initialization is now well factored enough to get rid of it. Try and connect to unplugged devices as well when using the device ID string.
* ao_wasapi: Fully convert to m_option APIDiogo Franco (Kovensky)2013-07-221-20/+10
|
* ao_wasapi: Don't leak the default device's ID when listing devicesDiogo Franco (Kovensky)2013-07-221-3/+4
| | | | Also remove unused variable.
* ao_wasapi: Annotate the default device when listing devicesDiogo Franco (Kovensky)2013-07-221-4/+17
|
* ao_wasapi: Refactor device listing/loadingDiogo Franco (Kovensky)2013-07-221-42/+97
| | | | | | | | | | | | Omit "{0.0.0.00000000}." on devices that start with that substring, re-add when searching for devices by ID. Log the device ID of the default device. Log the friendly name of the used device. Consistently refer to endpoints/devices as devices, as this is more consistent with mpv terminology.
* ao_wasapi0: Rename to ao_wasapiDiogo Franco (Kovensky)2013-07-221-0/+1194
Nobody knows what the 0 was for. There's no "WASAPI version 0". Just take it out.