| Commit message (Collapse) | Author | Age |
... | |
|
|
|
| |
also make failure non-fatal
|
|
|
|
|
| |
In particular, try and release/null the interface so that it won't be
marshalled.
|
|
|
|
|
| |
Also make sure that CoReleaseMarshalData is called if errors occur before
unmarshalling.
|
|
|
|
|
| |
also remove a log message in AOCONTROL_UPDATE_STREAM_TITLE since
none of the other controls have one.
|
|
|
|
| |
this was only ever used for a verbose message
|
|
|
|
|
| |
IUnknown_Release() might be alright, but stay on the safe
side.
|
|
|
|
|
|
|
|
|
| |
Do not try and set/get master volume in exclusive if there is no
hardware support. This would just uselessly change the master slider,
but have no effect on the actual volume.
Furthermore if getting hardware volume support information fails, then assume
it has none.
|
|
|
|
|
|
| |
It was complicated and not even very intuitive to the user.
If you are controlling the master volume, you just have to be
prepared to deal with the consequences.
|
|
|
|
| |
this is encountered trying to set up COM proxies in wine
|
|
|
|
|
| |
This was required to work around XP linking issues and is no longer
required.
|
|
|
|
|
|
|
|
|
|
| |
Apparently, some audio drivers do not support the DTS subtype, but
passthrough works anyway if the AC3 subtype is set. Just retry with
AC3 if the proper format doesn't work. The audio device which
exposed this behavior reported itself as
"M601d-A3/A3R (Intel(R) Display Audio)".
xbmc/kodi even always passes DTS as AC3.
|
|
|
|
|
| |
Until now, this was done only in debug verbosity, while some AOs logged
equivalent information in verbose mode. Clean this up.
|
|
|
|
|
|
|
|
|
|
|
| |
Revert "win32: more wchar_t -> WCHAR replacements"
Revert "win32: replace wchar_t with WCHAR"
Doing a "partial" port of this makes no sense anymore from my
perspective. Revert the changes, as they're confusing without
context, maintenance, and progress. These changes were a bit
premature anyway, and might actually cause other issues
(locale neutrality etc. as it was pointed out).
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was essentially missing from commit 0b52ac8a.
Since L"..." string literals have the type wchar_t[], we can't use them
for UTF-16 strings. Use C11 u"..." string literals instead. These have
the type char16_t[], but we simply assume char16_t is the same
underlying type as WCHAR. In practice, they're both unsigned short.
For this reason use -std=c11 on Windows. Since Windows is a "special"
environment (we require either MinGW or Cygwin), we don't need to worry
too much about compiler compatibility.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
WCHAR is more portable. While at least MinGW, Cygwin, and MSVC actually
use 16 bit wchar_t, Midipix will have 32 bit wchar_t. In that context,
using WCHAR instead is more portable.
This affects only non-MinGW parts, so not all uses of wchar_t need to
be changed. For example, terminal-win.c won't be used on Midipix at
all. (Most of io.c won't either, so the search & replace here is more
than necessary, but also not harmful.)
(Midipix is not useable yet, so this is just preparation.)
|
|
|
|
| |
This probably fixes the regression introduced with commit 6147bcce.
|
|
|
|
|
|
|
|
|
|
|
| |
Replace all the check macros with function calls. Give them all the
same case and naming schema.
Drop af_fmt2bits(). Only af_fmt2bps() survives as af_fmt_to_bytes().
Introduce af_fmt_is_pcm(), and use it in situations that used
!AF_FORMAT_IS_SPECIAL. Nobody really knew what a "special" format
was. It simply meant "not PCM".
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
af_fmt_is_float and af_fmt_is_planar were previously inconsistent with
AF_FORAMT_IS_SPECIAL/AF_FORMAT_IS_IEC61937
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* unify passthrough and pcm exclusive mode format setting/testing
* set passthrough format parameters correctly
* support all of mpv's existing passthrough formats
* automatically test passthrough with exclusive mode and enable
exclusive if it succeeds, even if it was not explictly requested.
this obviates the need for --ao=wasapi,wasapi=exclusive
* if passthrough fails (such as the device doesn't support the
format), fallback to either exclusive pcm or shared mode depending
on what the user specified. Right now this isn't very useful as
it still fails due to the decoder path remainin stuck on spdif.
fixes #1742
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
remove depricated and convoluted validation. refer instead to the
--audio-device option.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Rather than defining them ourselves. Thanks to rossy for figuring out
the headers.
|
| |
|
|
|
|
|
|
|
| |
More clearly separate the exclusive and shared mode format discovery.
Make the exclusive mode search more systematic in particular about
channel maps (i.e., use chmap_sel). Assume that the same sample format
/ sample rates work for all channels to narrow the search space.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This echanges the two events hForceFeed/hFeedDone for hResume. This
like the last commit makes things more deterministic.
Importantly, the forcefeed is only done if there is not already a full
buffer yet to be played by the device. This should fix some of the
problems with exclusive mode.
This commit also removes the necessity to have a proxy to the
AudioClient object in the main thread.
fixes #1529
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The MSDN documentation for IsFormatSupported says a return code of
AUDCLNT_E_UNSUPPORTED_FORMAT means the function "succeeded but the
specified format is not supported in exclusive mode." This seems to
imply that the format is supported in shared mode, and that's what the
old code assumed, however try_format would incorrectly return success
with some drivers.
The remarks section of the documentation contradicts that assumption. It
says that in shared mode, if the audio engine does not support the
caller-specified format or any similar format, ppClosestMatch is set to
NULL and the function returns AUDCLNT_E_UNSUPPORTED_FORMAT. This is the
same as in exclusive mode, so treat AUDCLNT_E_UNSUPPORTED_FORMAT the
same regardless of opt_exclusive. In shared mode, the format selection
code will fall back to the mix format, which should always be supported.
|
|
|
|
|
| |
Put the Vista+ (_WIN32_WINNT) and the COM C (COBJMACROS) defines into
the build system, instead of defining them over and over in the code.
|
| |
|
|
|
|
| |
fixes #1376
|
|
|
|
|
|
|
|
| |
* bits instead of bytes
* add valid_bits argument
* just pass in the mp_chmap and get the number and wavext channel map from that
* indicate valid bits in waveformat_to_str
* make appropriate accomodations in try_format
|
|
|
|
| |
someone on irc reported seeing this error
|
|
|
|
| |
before we were reinventing this wheel
|
|
|
|
| |
hopefully this fixes #1350
|
|
|
|
|
|
|
|
|
| |
There is no guarantee that closestMatch returned by IsFormatSupported
is actually a WAVEFORMATEXTENSIBLE.
http://msdn.microsoft.com/en-us/library/windows/desktop/dd370876%28v=vs.85%29.aspx
We should therefore not blindly treat it as such.
|
|
|
|
|
|
|
|
|
|
|
| |
Before it used whatever was in ao->format and changed the bits even
though this might have nothing to do with the actual WAVEFORMAT
negotiated with WASAPI.
For example, if the initial ao->format was a float and we had set the
WAVEFORMAT to s24, this would create a non-existent float24 format.
Worse, it might put an u16 into ao->format when WAVEFORMAT described s16.
WASAPI doesn't support unsigned at all as far as I can tell.
|
|
|
|
| |
also remove bogus ao_format
|
|
|
|
|
|
|
|
|
|
| |
This was based on old WAVEFORMATEX restrictions
http://msdn.microsoft.com/en-us/library/windows/hardware/ff538799%28v=vs.85%29.aspx
With the new WAVEFORMATEXTENSIBLE, this is no longer a problem. and we
can have s32 or float32 so we need to actually check / set these correctly.
fixes #1287
|
|
|
|
| |
it just sucks. noone should have to listen to that.
|
|
|
|
|
| |
It only confused the issue. Replace it's functionality with
waveformat_copy function where needed.
|
| |
|
|
|
|
| |
WAVEFORMATEXTENSIBLE size
|
|
|
|
|
|
|
| |
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).
|
| |
|
|
|
|
| |
Give them the prefix mp_ and make them nonstatic.
|
| |
|