summaryrefslogtreecommitdiffstats
path: root/audio/out/ao_coreaudio_exclusive.c
Commit message (Collapse)AuthorAgeFilesLines
* ao_coreaudio_exclusive: check new format before waiting for changewm42015-05-071-12/+13
| | | | | | | It seems if the format was already set, setting the same format will not cause a property change. (cherry picked from commit 0ae0e90eb5348c58d5b4f13fe0792199c460a4b6)
* ao_coreaudio_exclusive: use atomics instead of volatilewm42015-05-071-19/+16
| | | | | | | | | | | | | volatile barely means anything. The polling is kind of bad too, but relatively harmless as device opening/closing is a rare event, and the format change is not expected to take long. Remove the pointless talloc call too (must have been a leftover from previous refactoring). (cherry picked from commit 4444ff48fa578461688fe9feb9ebcd996cd64506)
* ao_coreaudio_exclusive: rename "digital" -> "compressed"wm42015-05-071-22/+20
| | | | | | PCM is digital too. (cherry picked from commit 028739932bf4e2d32439b3756811a2b06cc81128)
* ao_coreaudio_exclusive: explicitly check for spdif formatswm42015-05-071-8/+5
| | | | (cherry picked from commit 1e1045b13ea4acbbd77dd52c4e0599f1517e6ac3)
* ao_coreaudio_exclusive: merge init_digital() functionwm42015-05-071-15/+3
| | | | | | | | No reason to keep them separate. It's an artifact from the old ao_coreaudio.c, which kept usage of two different APIs in the same file. Removes a forward reference too. (cherry picked from commit 32bc61ae07fe441c327b4aa96dd80fa4771fd569)
* ao_coreaudio_exclusive: fix latency calculation non-sensewm42015-05-071-1/+1
| | | | | | Didn't use the properties it was supposed to use. (cherry picked from commit bbedceb467033b239b35ee9b2db963a93d8a57c9)
* ao_coreaudio_exclusive: check format explicitly on change notifcationwm42015-05-071-6/+11
| | | | | | | | | | | This should for now be equivalent; it's merely more explicit and will be required if we add PCM support. Note that the property listeners actually tell you what property exactly changed, but resolving the current listener mess would be too hard. So check for changes manually. (cherry picked from commit 382434d45a72967f5b607c871e363e02dce1f1e6)
* ao_coreaudio_exclusive: move code for getting original formatwm42015-04-291-6/+4
| | | | | | | Should be almost equivalent, unless there are streams on which this call does not work for unknown reasons. (cherry picked from commit 8b4ca5806207c1482df30d9815e6970697cea5b2)
* ao_coreaudio_exclusive: account for additional latencywm42015-04-291-3/+10
| | | | | | | | | Whether this is correct is unknown. This change tripples the latency from ~15ms to ~45ms. XBMC does this, VLC does not from what I could see. (cherry picked from commit 5f86fad2f0ab76b7497230b18cd146a7c4d38cd2)
* Update license headersMarcin Kurczewski2015-04-131-5/+4
| | | | Signed-off-by: wm4 <wm4@nowhere>
* ao_coreaudio_exclusive: port to pull API, fix latency calculationswm42015-03-101-78/+37
| | | | | | | | | | | | | | 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.
* ao_coreaudio_exclusive: rip out pseudo volume controlwm42015-03-101-40/+1
| | | | | | | | | | | | | | | | | 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.
* audio/out: consistently use double return type for get_delaywm42014-11-091-2/+2
| | | | | ao_get_delay() returns double, but the get_delay callback still returned float.
* rename ao_coreaudio_device.c -> ao_coreaudio_exclusive.cStefano Pigozzi2014-10-231-0/+667
This is so that the source file name matches the AO name