summaryrefslogtreecommitdiffstats
path: root/audio/out/ao_wasapi.c
Commit message (Collapse)AuthorAgeFilesLines
* audio/out: prepare for non-interleaved audiowm42013-11-121-7/+6
| | | | | | | | | | | | | | | | | | | This comes with two internal AO API changes: 1. ao_driver.play now can take non-interleaved audio. For this purpose, the data pointer is changed to void **data, where data[0] corresponds to the pointer in the old API. Also, the len argument as well as the return value are now in samples, not bytes. "Sample" in this context means the unit of the smallest possible audio frame, i.e. sample_size * channels. 2. ao_driver.get_space now returns samples instead of bytes. (Similar to the play function.) Change all AOs to use the new API. The AO API as exposed to the rest of the player still uses the old API. It's emulated in ao.c. This is purely to split the commits changing all AOs and the commits adding actual support for outputting N-I audio.
* audio/out: reject non-interleaved formatswm42013-11-121-0/+1
| | | | | | | | | | No AO can handle these, so it would be a problem if they get added later, and non-interleaved formats get accepted erroneously. Let them gracefully fall back to other formats. Most AOs actually would fall back, but to an unrelated formats. This is covered by this commit too, and if possible they should pick the interleaved variant if a non-interleaved format is requested.
* audio: replace af_fmt2str_short -> af_fmt_to_strwm42013-11-071-4/+4
| | | | Also, remove all af_fmt2str usages.
* audio/out: remove useless info struct and redundant fieldswm42013-10-231-6/+4
|
* core: move contents to mpvcore (2/2)Stefano Pigozzi2013-08-061-4/+4
| | | | Followup commit. Fixes all the files references.
* Merge pull request #154 from rossy2401/wasapi-pauseDiogo Franco2013-08-051-1/+2
|\ | | | | WASAPI stops working after pause
| * ao_wasapi: don't check the audio feed while pausedJames Ross-Gowan2013-07-271-1/+2
| |
* | Fix some warningsJonathan Yong2013-07-301-6/+6
|/
* audio/out: remove options argument from init()wm42013-07-221-1/+1
| | | | Same as with VOs in the previous commit.
* 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.