summaryrefslogtreecommitdiffstats
path: root/audio/out/ao_wasapi_utils.h
Commit message (Collapse)AuthorAgeFilesLines
* ao_wasapi: remove unnecessary header fileKevin Mitchell2016-01-051-48/+0
| | | | | All the wasapi files were including both ao_wasapi.h and ao_wasapi_utils.h. Just merge them into a single file.
* ao_wasapi: remove old vistablob prototypeKevin Mitchell2016-01-051-2/+0
| | | | this function was removed earlier, but the prototype was missed
* ao_wasapi: make find_deviceID read only wrt struct aoKevin Mitchell2016-01-051-1/+1
| | | | This makes it clearer that state->device is being allocated.
* ao_wasapi: move device selection to main threadKevin Mitchell2016-01-051-0/+1
| | | | In attempt to simplify the audio event thread, this can now be moved out.
* ao_wasapi: remove +x flag from fileswm42016-01-041-0/+0
|
* ao_wasapi: non-fatal error handling for COM marshallingKevin Mitchell2015-12-211-1/+1
| | | | | Also make sure that CoReleaseMarshalData is called if errors occur before unmarshalling.
* ao_wasapi: get rid of Vistablob hackKevin Mitchell2015-11-241-0/+1
| | | | | This was required to work around XP linking issues and is no longer required.
* ao/wasapi: use atomic state variable instead of different eventsKevin Mitchell2015-04-041-1/+1
| | | | | | | | | Unfortunately, because we have proxy objects (pAudioVolumeProxy, pEndpointVolumeProxy, pSessionControlProxy) it looks like we still have to use MsgWaitForMultipleObjects and watch for and dispatch pending messages: https://msdn.microsoft.com/en-us/library/windows/desktop/ms680112%28v=vs.85%29.aspx
* ao_wasapi: abstract HRESULT_to_strKevin Mitchell2015-04-011-2/+2
|
* ao_wasapi: simplify hotplugKevin Mitchell2015-03-311-5/+1
| | | | | | | | | Take advantage of the fact that list_devs is called with a hotplug_inited ao. Also eliminate unnecessary nested function abstraction of hotplug_(un)init and list_devs. However, keep list_devs in ao_wasapi_utils.c since it uses the private functions get_device_id, get_device_name and exposing these would require including headers for IMMDevice in ao_wasapi_utils.h.
* ao_wasapi: fix device listingKevin Mitchell2015-03-311-6/+2
| | | | | remove depricated and convoluted validation. refer instead to the --audio-device option.
* ao/wasapi: add ao hotplugKevin Mitchell2015-03-311-0/+3
| | | | | | | Create a second copy of the change_notify structure for the hotplug ao. change_notify->is_hotplug distinguishes the hotplug version from the regular one monitoring the currently playing ao. Also make the change notification less verbose now that there might be two of them around.
* ao/wasapi: use IsEqualGUID and IsEqualPropertyKeyKevin Mitchell2014-12-161-2/+0
| | | | before we were reinventing this wheel
* ao/wasapi: make functions return bool that were acting like itKevin Mitchell2014-11-281-3/+3
| | | | | | | this involved inverting the logic of find_formats, enumerate_devies and wasapi_fill_VistaBlob. The latter two were trivial as their return values were not actually checked (to be fixed in a later commit).
* ao/wasapi: check full GUID of KSDATAFORMAT to determine floatKevin Mitchell2014-11-281-0/+1
|
* ao/wasapi: expose GUID and PKEY convenience functionsKevin Mitchell2014-11-281-0/+6
| | | | Give them the prefix mp_ and make them nonstatic.
* ao/wasapi: tidy up better on failureKevin Mitchell2014-11-171-0/+2
| | | | | | | Before, failures, particularly in the thread loop init, could lead to a bad state for the duration of mpvs execution. Make sure that everything that was initialized gets properly and safely uninitialized.
* ao/wasapi: improve error messages and add more debug statementsKevin Mitchell2014-11-171-1/+1
| | | | | | also enforce more consistency in the exit codes and error handling thanks to Jonathan Yong <10walls@gmail.com>
* ao/wasapi: make calling of thread_init consistent with thread_uninitKevin Mitchell2014-11-171-1/+1
|
* ao_wasapi: implement device listingwm42014-10-131-1/+2
|
* ao_wasapi: Move non-critical code outside of the event threadDiogo Franco (Kovensky)2014-03-111-18/+7
| | | | | | | | | | | | | | | Due to the COM Single-Threaded Apartment model, the thread owning the objects will still do all the actual method calls (in the form of message dispatches), but at least this will be COM's problem rather than having to set up several handles and adding extra code to the event thread. Since the event thread still needs to own the WASAPI handles to avoid waiting on another thread to dispatch the messages, the init and uninit code still has to run in the thread. This also removes a broken drain implementation and removes unused headers from each of the files split from the original ao_wasapi.c.
* ao_wasapi: Split into 2 filesDiogo Franco (Kovensky)2014-03-111-0/+56
ao_wasapi.c was almost entirely init code mixed with option code and occasionally actual audio handling code. Split most things to ao_wasapi_utils.c and keep the audio handling code in ao_wasapi.c.