| Commit message (Collapse) | Author | Age |
|
|
|
| |
And also use the correct type for the printf call below.
|
|
|
|
| |
Fixes #1743 and partially #1780.
|
|
|
|
|
|
|
|
|
|
| |
The af_add() function has a problem: if the inserted filter returns
AF_DETACH during init, the function will have a dangling pointer. Until
now this was avoided by making sure none of the used filters actually
return AF_DETACH, but it's getting infeasible.
Solve this by requiring passing an unique label to af_add(), which is
then used instead of the pointer.
|
|
|
|
|
|
|
|
| |
Silence the usually user-visible warning about unsupported channel maps.
This might be an ALSA bug, but ALSA will never fix this behavior anyway.
(Or maybe it's a feature.)
Log some other information that might be useful.
|
|
|
|
|
|
| |
The message log level shouldn't get to decide whether something fails
or not. So replace the fatal error check on the verbose output code
path with a warning.
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
libswresample doesn't normalize when remixing to a float format. This
will cause clipping due to float samples being out of the allowed range.
Fortunately this extremely bad default can be changed.
This does not happen with libavresample: it normalizes by default.
Fixes #1752.
|
| |
|
| |
|
|
|
|
|
|
| |
Per-app volume would change the volume across all instances of the same
application, while a private volume control (HAS_PER_APP_VOLUME)
obviously should influence only one instance/audio stream only.
|
|
|
|
|
| |
CoreAudio doesn't seem to have this concept. The volume is reset the
next time audio is opened.
|
|
|
|
| |
Just so that this special-case is out of the common volume path.
|
| |
|
|
|
|
| |
For remote-debugging volume rstore problems.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
This was requested, more or less.
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
The code actually uses blocking mode, so opening sound device in non-blocking
mode results in choppy sound. Also, inflating the buffer isn't necessary in
blocking mode, so the function may simply return without doing anything.
|
|
|
|
|
|
|
|
|
|
| |
This broke with PulseAudio: when changing some audio filters (like for
playback speed), mixer_reinit_audio() was called - and it overwrote the
volume with whatever mpv thought the volume was before. If the volume
was changed externally before and while mpv was running, this would
reset the volume to the old value.
Fixes #1335.
|
|
|
|
|
|
|
|
|
| |
The details are described in #1173.
This "features" causes problems to users so often, it's better to remove
it.
Fixes #1173.
|
|
|
|
|
|
|
| |
We've been prefering the libavcodec mp3 decoder for half a year now.
There is likely no benefit at all for using the libmpg123 one. It's just
a maintenance burden, and tricks users into thinking it's a required
dependency.
|
|
|
|
|
|
|
|
|
| |
--af=bs2b:help abort()ed because the default value of the "profile"
option is not represented by any choice. Fix it by adding an "unset"
choice. (It's a bit odd because there's already a "default" choice,
which is not default, but I don't care enough about this filter.)
Fixes #1712.
|
|
|
|
|
|
|
|
|
|
|
| |
Trying to handle such video is almost worthless, but it was requested by
at least 2 users.
If there are no timestamps, enable byte seeking by setting
ts_resets_possible. Use the video FPS (wherever it comes from) and the
audio samplerate for timing. The latter was already done by making the
first packet emit DTS=0; remove this again and do it "properly" in a
higher level.
|
|
|
|
|
|
|
|
| |
To handle seeking correctly, we need to flush the filter. libavfilter
does not support flushing, so we destroy and recreate it. We also need
to handle resume-after-EOF, because the mpv audio code sends an EOF
before and after seeking (the latter happens because the player drains
the filter chain in a generic way, which "causes" EOF).
|
|
|
|
|
| |
This function already got uglified with debug printing; might as well go
all the way.
|
|
|
|
|
|
|
| |
The consequence was that some AOs (like ao_jack) could not output 8
channels.
Fixes #1688.
|
|
|
|
| |
Might or might not matter.
|
|
|
|
|
|
|
|
|
|
|
| |
In commit 5f8b060e I blindly assumed that the packet sizes were in
pseudo-samples, but they were actually in bytes. Oops.
(The effect was that cutting the audio was a bit less precise than it
can be.)
Also remove the packet size from ad_spdif.c; it didn't actually use it,
and simply takes what the spdif "muxer" returns.
|
|
|
|
| |
Broken in one of the previous commits.
|
|
|
|
|
|
| |
Needed for the next commit. This commit should probably be reverted as
soon as we're working with full audio frames internally, instead of
"flat" FIFOs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of maintaining a private ring buffer, use the generic support
for audio APIs with pull callbacks (internally called AO pull API). This
also fixes latency calculations: instead of just returning the
ringbuffer status, the audio playback state is calculated better and
includes interpolation.
The main reason this wasn't done earlier was mid-stream format
switching. The pull API can now handle it (in a way) by destroying and
recreating the AO. This is a bit brutal, but quite simple. It's untested
in this new AO, though. Some details might not be right, like how ot
restores the old format when reloading.
|
|
|
|
| |
Needed by ao_coreaudio_exclusive.c in the next commit.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This could mute a digital passthrough stream by writing zeros. All other
volume values did nothing.
The comment about MPlayer dying hasn't been true in mpv for quite a
while. It's even possible that it's fixed in upstream MPlayer. mpv will
print a scary error message when trying to change volume with spdif, and
continue normally.
If we really want to mute by writing zeros, we should do it in a
separate filter. But I'm not overly fascinated by this approach; is it
even guaranteed receivers will not be confused by a stream of zeros?
The main reason to remove this is that it's in the way of further
cleanups.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Handle the failure gracefully, instead of exploding and disabling audio.
Just set the speed back to 1.0.
Also remove the AF_DETACH from af_scaletempo. This actually created a
dangling pointer in af_add(), a tricky consequence of af_add()
reconfiguring the filter chain and the newly added filter using
AF_DETACH. Fortunately the AF_DETACH is not needed (and probably never
worked - it comes from MPlayer times, and MPlayer also disables audio
when trying to change speed with spdif).
|
| |
|
|
|
|
|
|
|
|
|
| |
This matters only when setting obscure scaletempo suboptions.
See #1653.
(But what we really should do is figuring out how to do this in a sane
way.)
|
|
|
|
| |
It was annoying and didn't ever help with anything.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Although the libraries we use for resampling (libavresample and
libswresample) do not support changing sampelrate on the fly, this makes
it easier to make sure no audio buffers are implicitly dropped. In fact,
this commit adds additional code to drain the resampler explicitly.
Changing speed twice without feeding audio in-between made it crash
with libavresample inc ertain cases (libswresample is fine). This is
probably a libavresample bug. Hopefully this will be fixed, and also I
attempted to workaround the situation that crashes it. (It seems to
point in direction of random memory corruption, though.)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|