Steve Lhomme
ec9b8c4569
wasapi: use a faster perfomance clock in the normal case
We don't need an expensive lldiv() in the normal case.
In this variant, the read value is simplify divided by 10.
5 years ago
Steve Lhomme
8753be2560
aout: wasapi: fix variable shadowing
freq is also a global variable.
5 years ago
Romain Vimont
a9f7449e5e
config: remove remaining "advanced" flags
The config "advanced" flag was unused and has been removed by
6a7a137f7b .
It has been removed from many add_*() macros, but not all. Remove it
from the remaining macros.
5 years ago
Francois Cartegnie
408a9547db
vlc_codecs: fix twocc mmreg.h collisions
6 years ago
Steve Lhomme
17b13a2450
aout: wasapi: use a vlc_timer for the deferred start
The timer API is not supported in Winstore builds so switch to something that
works for all.
The timer (thread based) is created once and armed/disarmed when needed.
6 years ago
Rémi Denis-Courmont
3906d0e0d7
Remove/substitute useless vlc_atomic.h include
7 years ago
Thomas Guillem
0426f86b66
wasapi: add an option to handle exclusive mode
cf. WASAPI_EXCLUSIVE_LONGTEXT
7 years ago
Thomas Guillem
d03ce65f43
wasapi: add 24bits support
But don't use VLC_CODEC_S24N as this fourcc is not handled by any audio
filters. Instead, request VLC_CODEC_S32N to VLC and do the conversion
internally.
This commit is needed by the next commit since some sound cards only support
24bits.
7 years ago
Thomas Guillem
7faa2b7745
wasapi: don't overwrite shared_mode
It was needed when the module handled the passthrough -> PCM fallback itself.
7 years ago
Thomas Guillem
ba92afa31b
wasapi: respect IsFormatSupported documentation
The documentation says: "For exclusive mode, set ppClosestMatch to NULL".
7 years ago
Thomas Guillem
b49ee904af
wasapi: refactor
Handle spdif and hdmi in the same code block.
No functional changes.
7 years ago
Thomas Guillem
d69bae284b
aout: handle DTSHD->DTS fallback
Use the DTSHD fourcc instead of the hacked "dtshd" variable.
The DTSHD -> DTS fallback is now handled in aout core, the same code path will
be used for EAC3 -> AC3 fallback. Therefore, aout modules don't have to handle
the DTSHD -> DTS fallback anymore. If a module can't handle DTSHD, it should
return an error and the DTS fourcc will be tried right after.
7 years ago
Thomas Guillem
144b333b3e
wasapi: start deferred
The idea is to act like PulseAudio and coreaudio recently.
Instead of returning a valid date from the first TimeGet() to let the core
handle the initial delay, the initial delay is handled inside this module by
deferring the Start.
The big advantage of this solution is that this module can now handle a change
of play date.
A Windows Timer is used to defer this start. Audio samples are written while
the AudioClient is not started (behavior handled according to the
documentation). If the audio buffer is full before the AudioClient is started,
the Play function will wait for it.
7 years ago
Thomas Guillem
fd04c9b2fa
mmdevice: pass play date to streams
7 years ago
Rémi Denis-Courmont
542df0f3ad
Use set_callback() where applicable
7 years ago
Rémi Denis-Courmont
d85d95ccf4
aout: move aout stream stop callback...
...into to aout_stream_t.
This is much simpler and provides type safety.
7 years ago
Rémi Denis-Courmont
c42efae068
wasapi: reorder code
Non-functional change.
7 years ago
Steve Lhomme
67ea55b05a
windows modules: use a consistent format to log HRESULT
7 years ago
Rémi Denis-Courmont
1ece990f07
wasapi: fix fallthrough warnings
7 years ago
Rémi Denis-Courmont
d867dac99e
Use vlc_object_parent()
8 years ago
Steve Lhomme
b22c910dc9
wasapi: use vlc_tick_from_frac() to compute the buffer delay
8 years ago
Thomas Guillem
3c68e5ff1f
wasapi: fix passthrough with DTS WAV
8 years ago
Steve Lhomme
64f8a99af9
wasapi: handle the QPC as an msftime_t converted with VLC_TICK_FROM_MSFTIME()
8 years ago
Steve Lhomme
bf1ae793a1
aout:wasapi: use the 200ms explicitly instead of a bogus reference to AOUT_MAX_PREPARE_TIME
buffer_duration is REFERENCE_TIME and should not be written with a vlc_tick_t
8 years ago
Steve Lhomme
565ee29aa3
aout:wasapi: use MSFTIME_FROM_VLC_TICK to convert to REFERENCE_TIME
8 years ago
Steve Lhomme
e41dac0925
module: replace hardcoded CLOCK_FREQ fractions by VLC_TICK_FROM_MS()
8 years ago
Steve Lhomme
8b0c6bb9fa
rename msleep() to vlc_tick_sleep()
8 years ago
Steve Lhomme
ff56c92a5e
rename mtime_t to vlc_tick_t
Keep a copy of vlc_tick_tfor backward compatibility.
8 years ago
Thomas Guillem
c791a845c8
wasapi: fix comments
8 years ago
Jean-Baptiste Kempf
eb82d3412e
wasapi: improve debug log in failure cases
Should help for #19541
9 years ago
Thomas Guillem
ae9c49598c
aout: mmdevice: setup DTS_HD output only when needed
9 years ago
Thomas Guillem
d913ae19b4
mmdevice: add a way to disable passthrough
cf. http://nucblog.net/2017/03/intel-releases-the-final-hdmi-firmware-for-apollo-and-kaby-lake/
There will be always bugs in OSes, drivers, HDMI firmwares, or HDMI receivers.
The users will always need a way to disable passthrough if it doesn't work.
Contrary to other OSes like Linux or macOS, I didn't find any way to disable
passthrough for a codec.
Refs #18112
Fixes #19279
9 years ago
Rémi Denis-Courmont
945e9ceac4
mmdevice: remove dead code
9 years ago
Steve Lhomme
9a826c9f9d
audio_output:wasapi: make sure pwf_mix is initialized when we call CoTaskMemFree()
Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
9 years ago
Thomas Guillem
271ddeb3a8
aout: wasapi: handle AUDIO_CHANNELS_TYPE_AMBISONICS
Use native mix format and setup low latency in that case.
9 years ago
Thomas Guillem
91f426996c
es: replace i_original_channels with i_chan_mode
Rename i_original_channels to i_chan_mode. For now, chan modes can be
DOLBYSTEREO or DUALMONO.
This new value, i_chan_mode, should only be set by demuxes/codecs/packetizers
if there is a special stereo mode to handle.
9 years ago
Thomas Guillem
4c68f3873f
wasapi: fix TRUEHD output rate
10 years ago
Thomas Guillem
4d76ec75d5
wasapi: handle DTS-HD
10 years ago
Thomas Guillem
55b4efce04
wasapi: set max buffer duration to 2 seconds in exclusive mode
See AUDCLNT_E_BUFFER_SIZE_ERROR in IAudioClient::Initialize msdn doc.
10 years ago
Thomas Guillem
0ae30bfe34
wasapi: fix wrong state when the fmt is not recognised
10 years ago
Rémi Denis-Courmont
91ad414900
win32: use _WIN32_WINNT_VISTA
10 years ago
Thomas Guillem
bf8c5ab219
wasapi: don't try to convert unsupported formats
10 years ago
Thomas Guillem
3a21071367
wasapi: add TRUEHD/MLP support
10 years ago
Thomas Guillem
92c154dcf2
wasapi: fix buffer_duration for hdmi formats
10 years ago
Thomas Guillem
d7341fdca4
wasapi: set i_bytes_per_frame for S/PDIF
10 years ago
Thomas Guillem
539a380b36
wasapi: add EAC3 support
10 years ago
Thomas Guillem
ceec14e44b
wasapi: simplify
Use block_align directly instead of calculating it for each blocks.
10 years ago
Thomas Guillem
115e126615
wasapi: refactor
pwf points now to the chosen wave format.
10 years ago
Thomas Guillem
4af14a43da
wasapi: log when digital pass-through fails
10 years ago
Thomas Guillem
37becfaa00
wasapi: use DTS subformat for DTS
10 years ago