| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is basically a libavcodec API oddity: it can happen that
avcodec_decode_audio4() returns 0 (meaning 0 bytes were consumed). It
requires you to feed the complete packet again to decode the full
packet, and to successfully decode the following packets.
We ignored this case with the argument that there's the danger of an
endless decode loop (because nothing of that packet is apparently
decoded, so it would retry forever), but change it in order to decode
mpc8 files correctly.
Also add some comments to explain the mess.
|
|
|
|
|
|
|
| |
af_str2fmt_short(), which is used by the command line option parser,
allowed passing a hex number. The user could set arbitrary integers as
internal audio formats, even formats which don't exist or make no sense.
This is not very useful, so get rid of it.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Having to use -1 for that is generally quite annoying.
Audio formats are created from bitmasks, and it can't be excluded that
0 is not a valid format. Fix this by adjusting AF_FORMAT_I so that it
is never 0. Along with AF_FORMAT_F and the special formats, all valid
formats are covered and guaranteed to be non-0.
It's possible that this commit will cause some regressions, as the
check for invalid audio formats changes a bit.
|
|
|
|
|
| |
Also add a note to mp_msg.h, since it might be not clear which of the
two mechanisms is preferred.
|
|
|
|
|
|
|
| |
Use the new MP_ macros for some AOs instead of mp_msg.
Not all AOs are converted, and some only partially. In some cases, some
additional cosmetic changes are made.
|
| |
|
|
|
|
| |
Followup commit. Fixes all the files references.
|
|\
| |
| | |
WASAPI stops working after pause
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The --speed option and the speed property used float. Change them to
double.
Change the commands that manipulate the property (speed_mult/add) to
double as well. Since the cycle command shares code with the add
command, we change that as well.
The reason for this change is that this allows better control over
speed, such as stepping by semitones. Using floats is also just plain
unnecessary.
|
| | |
|
| |
| |
| |
| | |
They are already defined in the header file
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
Using the default output audio unit should provide a much better user
exeperience since it changes automatically the output device based on which
becomes the default one.
|
| |
| |
| |
| |
| |
| | |
This was removed in d427b4fd. I now found a sample that causes underruns when
moving to a chapter and apparently this is also a problem when taking
screenshots.
|
|/
|
|
|
|
|
|
|
|
|
|
| |
Reverts one of the changes from 18777ecf. `kAudioObjectPropertyScopeOutput`
was introduced in the 10.8 SDK while `kAudioDevicePropertyScopeOutput` was
moved to `AudioHardwareDeprecated.h`. Since the deprecation is silent for now
(no warnings), just use the old constant.
Either way, they both evaluate to 'outp', and in the 10.8 SDK the deprecated
constant is defined in terms of the non-deprecated one.
Fixes #155
|
|
|
|
|
|
| |
In general, this warning can hint to actual bugs. We don't enable it
yet, because it would conflict with some unmerged code, and we should
check with clang too (this commit was done by testing with gcc).
|
|
|
|
|
| |
This means that AOs/VOs with no options set do not take the legacy
option parsing path, but instead report that they have no options.
|
|
|
|
| |
Same as with VOs in the previous commit.
|
|
|
|
| |
Finally not used by anything anymore. Farewell.
|
|
|
|
|
| |
The big endian case was not covered. Doesn't make much difference since mpv
runs on Macs with x86 only, but for the sake of correctness.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This is not done automatically by CoreAudio. I am told that it would a PITA
to have to switch back the format manually on the device (especially if the
same device is used for lpcm output).
|
|
|
|
|
|
| |
b2f9e0610 introduced this functionality with code that was quite 'monolithic'.
Split the functionality over several functions and ose the new macros to get
array properties.
|
|
|
|
|
|
|
|
| |
Introduce some macros to deal with properties. These allow to work around the
limitation of CoreAudio's API being `void **` based. The macros allow to keep
their client's code DRY, by not asking size and other details which can be
derived by the macro itself. I have no idea why Apple didn't design their API
like this in the first place.
|
| |
|
|
|
|
|
|
|
|
|
| |
* ao_coreaudio_utils: contains several utility function
* ao_coreaudio_properties: contains functions to set and get audio object
properties.
Conflicts:
audio/out/ao_coreaudio.c
|
|
|
|
|
| |
Previous code needlessly stored the input asbd before actually testing it's
support against the hardware.
|
| |
|
|
|
|
| |
this is a wip
|
|
|
|
|
|
| |
The condition was checked wrongly on asbd which is the input format
description. This lead to the condition always being true, thus selecting lpcm
streams for digital input.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
kHALOutputParam_Volume is the linear gain so it should be at maximum 1 to
keep the audio quality good. No idea why it was more than that.
|
|
|
|
| |
Also extract this functionality inside a function in coreaudio_common
|
| |
|
|
|
|
|
| |
Luckily they all were inside for loops so the functionality does not actually
change.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The initialization is split more clearly between compressed and lpcm case.
For the compressed case, format selection is simplified a lot and negotiation
removed. The way it was written it just passed back to the core the original
requested format, not what was found available on hardware.
Since this is most likely useless for the compressed case, I didn't bother
with this. In the future I'd like to split this AO in two one that only uses
the AUHAL and the other with direct access to the hardware so that even
passthrough of lcpm can be possible. This would decrease the latency,
audiophiles would like that.
|
| |
|
|
|
|
|
|
|
| |
Split out some utility functions that use the CoreAudio API but are not related
the main task of the AOs (which is to move data correctly to the ringbuffer).
These are mainly need for the verbosity of the CoreAudio API and are just
obscuring the 'real' code.
|
|
|
|
| |
property_address -> p_addr
|
|
|
|
| |
WIP
|
|
|
|
|
| |
Change the ca_msg macro to pass along MSGT_AO automatically. Also use it for
every output for consistency.
|
|
|
|
|
| |
It was reported that it also works by not setting the read size in the
AudioBuffer (now idea how, but I will discover it later).
|
| |
|
|
|
|
|
|
|
| |
Read only the requested amount by the AUHAL (instead of all the buffered data).
No idea what the deal is with pausing the audio units if there is no audio to
play, maybe to avoid underruns of some sort. Anyway from my tests this
condition never occurred so I'm removing it all.
|
| |
|
|
|
|
|
| |
This makes it actually possible to use the filter with more complicated
filter graphs (such as graphs containing the "," character).
|
| |
|
|
|
|
|
| |
Also add a "o" suboption, which should allow fine control over
libavresample.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make the VF/VO/AO option parser available to audio filters. No audio
filter uses this yet, but it's still a quite intrusive change.
In particular, the commands for manipulating filters at runtime
completely change. We delete the old code, and use the same
infrastructure as for video filters. (This forces complete
reinitialization of the filter chain, which hopefully isn't a problem
for any use cases. The old code forced reinitialization too, but it
could potentially allow a filter to cache things; e.g. consider loaded
ladspa plugins and such.)
|
|
|
|
| |
This is useful for debugging.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This code is supposed to run if dynamic filter insertion (such as when
inserting a volume filter in mixer.c) fails. Then it removes all filters
and recreates the default list of filters. But the code just blew up and
entered an endless loop, because it removed even the sentinel in/out
filters. This could happen when trying to use softvol controls while
using spdif, but also other situations. Fix it by calling the correct
code.
Also remove these obnoxious yoda-conditions.
|
|
|
|
|
| |
Declare decoders directly, instead of using the LIBAD_EXTERN macro. This
is simpler (no weird magic) and more extensible.
|
|
|
|
| |
Ahead of OSS because cygwin provides OSS.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
That's the sample format ad_spdif uses when the source is MP3.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Caused by incorrect conversion to the m_option API: since we don't allocate
the state ourselves, we also don't free it ourselves.
|
|
|