_stricmp a Windows thing that is present in all the CRT, even in UCRT.
The stricmp() deprecated variant doesn't seem to exist elsewhere.
In some configuration it's not possible to link with stricmp() even though
_stricmp() is available.
AVAudioSessionRouteSharingPolicy type and values are available starting
with SDK iOS 11. This commit is tagging the structures properly so that
it doesn't raise warning/errors and move the functions to runtime
availability.
AVAudioSessionMode type is available starting with the SDK for iOS 12,
as well as AVAudioSessionCategory. Use the value directly instead of
storing the values in the variables.
AVAudioSessionRouteSharingPolicyLongFormAudio and
AVAudioSessionRouteSharingPolicyLongFormVideo are available starting
with iOS 13.0 and were not available in the previous SDKs, so expose
them as AVAudioSessionRouteSharingPolicyLongForm in older SDKs (which
is the LongFormAudio alias).
setPreferredOutputNumberOfChannels can fail, don't configure more
channels than accepted. The OS will drop the extra channels instead of
downmixing it.
When I first tested it, the apple TV was configured to always accept
surround even with a stereo output (Change Format = Off) but this is not
necessarily the case.
Only report the timing when all the data has been processed. Indeed, the
timing includes the length of the buffer to write. Reporting the timing
in the middle could cause a difference of [0; IOBufferDuration] (between
0 and 23ms generally).
It is very unlikely that AudioUnitGetProperty(kAudioUnitProperty_Latency) can
change midstream (contrary to [AVInstance outputLatency]), so only fetch
this latency when starting the AudioUnit.
This fixes a deadlock between the render callback and AudioUnitStop().
Fixes#27591
Because AVAudioSessionRouteChangeNotification is not triggered when
switching Speaker <-> Airplay2 (but it is triggered for BT <-> Anything).
Fixes A/V sync with AirPlay2 when Airplay is changed during playback.
Fixes delay with bluetooth devices.
Pretty sure I tested it in the past and it was producing worst results.
Now we match the QuickTime player regarding A/V sync (tested with a
Sync-One2 device).
Fixes#27512
Code written by me few years ago but quite hard to understand (even by
the author), rework it by taking inspiration from the AAudio plugin.
Don't use both mach host time and vlc_tick_t but transform immediatly
the host_time to a delay (in ticks) and always use ticks.
Move the big (2seconds) java circular buffer to a frame FIFO and
allocate a java buffer corresponding to the frame size (keep it, and
realloc if the frame become bigger).
Do no wait from play anymore but feed the FIFO instantaneously.
Fixes#27541