aboutsummaryrefslogtreecommitdiffhomepage
path: root/audio/out/ao_coreaudio.c
Commit message (Collapse)AuthorAge
...
* ao_coreaudio: report latency more correctlyGravatar Stefano Pigozzi2014-07-02
| | | | | | | | | | Previous code was completly wrong. This still doesn't report the device latency, but we report the buffer latency (as before the AO refactoring) and the AudioUnit's latency (this is a new 'feature'). Apparently we can also report the device actual latency and we should also calculate the actual sample rate of the audio device instead of using the nominal sample rate, but I'll leave this for a later commit.
* ao_coreaudio: move channel mapping away from utilsGravatar Stefano Pigozzi2014-07-02
| | | | | Channel mapping functions are only used in the AUHAL based coreaudio, so move them there.
* ao_coreaudio: use mpv's internal pull APIGravatar Stefano Pigozzi2014-07-02
|
* ao_coreaudio: remove useless commentsGravatar Stefano Pigozzi2014-07-02
|
* ao_coreaudio: rename init_lpcm -> init_audiounitGravatar Stefano Pigozzi2014-07-02
|
* ao_coreaudio: fill asbd with an helper functionGravatar Stefano Pigozzi2014-07-02
|
* ao_coreaudio: split control to helper functionsGravatar Stefano Pigozzi2014-07-02
|
* ao_coreaudio: remove useless call to print_asbdGravatar Stefano Pigozzi2014-07-02
|
* ao_coreaudio: move spdif code to a new AOGravatar Stefano Pigozzi2014-07-02
| | | | | | | | | | | | | | | | The mplayer1/2/mpv CoreAudio audio output historically contained both usage of AUHAL APIs (these go through the CoreAudio audio server) and the Device based APIs (used only for output of compressed formats in exclusive mode). The latter is a very unwieldy and low level API and pretty much forces us to write a lot of code for little workr. Also with the widespread of HDMI, the actual need for outputting compressed audio directly to the device is getting lower (it was very useful with S/PDIF for bandwidth constraints not allowing a number if channels transmitted in LPCM). Considering how invasive it is (uses hog/exclusive mode), the new AO (`ao_coreaudio_device`) is not going to be autoprobed but the user will have to select it.
* ao_coreaudio: remove useless codeGravatar Stefano Pigozzi2014-05-10
| | | | | This code doesn't actually makes much of a difference, and the AudioUnit mostly wants layout tags anyway.
* ao_coreaudio: don't fallback to full waveextGravatar Stefano Pigozzi2014-05-10
| | | | | | The code was falling back to the full waveext chmap_sel when less than 2 channels were detected. This new code is slightly more correct since it only fills the chmap_sel with the stereo or mono chmap in the fallback case.
* ao_coreaudio: print an error when channel mapping failsGravatar Stefano Pigozzi2014-05-10
|
* ao_coreaudio: use description-based channel layoutsGravatar Stefano Pigozzi2014-05-10
| | | | | | | | | | | | CoreAudio supports 3 kinds of layouts: bitmap based, tag based, and speaker description based (using either channel labels or positional data). Previously we tried to convert everything to bitmap based channel layouts, but it turns out description based ones are the most generic and there are built-in CoreAudio APIs to perform the conversion in this direction. Moreover description based layouts support waveext extensions (like SDL and SDR), and are easier to map to mp_chmaps.
* audio/out: make draining a separate operationGravatar wm42014-03-09
| | | | | | | | | | | | Until now, this was always conflated with uninit. This was ugly, and also many AOs emulated this manually (or just ignored it). Make draining an explicit operation, so AOs which support it can provide it, and for all others generic code will emulate it. For ao_wasapi, we keep it simple and basically disable the internal draining implementation (maybe it should be restored later). Tested on Linux only.
* audio/out: make ao struct opaqueGravatar wm42014-03-09
| | | | | | We want to move the AO to its own thread. There's no technical reason for making the ao struct opaque to do this. But it helps us sleep at night, because we can control access to shared state better.
* msg: rename mp_msg_log -> mp_msgGravatar wm42013-12-21
| | | | Same for companion functions.
* Split mpvcore/ into common/, misc/, bstr/Gravatar wm42013-12-17
|
* Move options/config related files from mpvcore/ to options/Gravatar wm42013-12-17
| | | | | | | | | Since m_option.h and options.h are extremely often included, a lot of files have to be changed. Moving path.c/h to options/ is a bit questionable, but since this is mainly about access to config files (which are also handled in options/), it's probably ok.
* audio/out: prepare for non-interleaved audioGravatar wm42013-11-12
| | | | | | | | | | | | | | | | | | | This comes with two internal AO API changes: 1. ao_driver.play now can take non-interleaved audio. For this purpose, the data pointer is changed to void **data, where data[0] corresponds to the pointer in the old API. Also, the len argument as well as the return value are now in samples, not bytes. "Sample" in this context means the unit of the smallest possible audio frame, i.e. sample_size * channels. 2. ao_driver.get_space now returns samples instead of bytes. (Similar to the play function.) Change all AOs to use the new API. The AO API as exposed to the rest of the player still uses the old API. It's emulated in ao.c. This is purely to split the commits changing all AOs and the commits adding actual support for outputting N-I audio.
* audio/out: reject non-interleaved formatsGravatar wm42013-11-12
| | | | | | | | | | No AO can handle these, so it would be a problem if they get added later, and non-interleaved formats get accepted erroneously. Let them gracefully fall back to other formats. Most AOs actually would fall back, but to an unrelated formats. This is covered by this commit too, and if possible they should pick the interleaved variant if a non-interleaved format is requested.
* osx: fix -Wshadow warnings on platform specific codeGravatar Stefano Pigozzi2013-11-04
|
* audio/out: remove useless info struct and redundant fieldsGravatar wm42013-10-23
|
* ao_coreaudio: clear output buffer on buffer underrunGravatar Stefano Pigozzi2013-10-03
| | | | | | | | Output silence to the output buffer during underruns. This removes small occasional glitches that happen before the AUHAL is actually paused from the `audio_pause` call. Fixes #269
* ao_coreaudio: fetch device name only for verbose log levelGravatar Stefano Pigozzi2013-10-01
| | | | | The previous code fetched the device name regardless of log level and then only printed it if log level was verbose.
* core: move contents to mpvcore (2/2)Gravatar Stefano Pigozzi2013-08-06
| | | | Followup commit. Fixes all the files references.
* ao_coreaudio: move to new log APIGravatar Stefano Pigozzi2013-08-01
|
* ao_coreaudio: use default output unit when no device is specifiedGravatar Stefano Pigozzi2013-07-29
| | | | | | 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.
* ao_coreaudio: prevent buffer underruns to output garbageGravatar Stefano Pigozzi2013-07-28
| | | | | | 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.
* audio/out: remove options argument from init()Gravatar wm42013-07-22
| | | | Same as with VOs in the previous commit.
* ao_coreaudio: fix ifdef'd conditionalGravatar Stefano Pigozzi2013-07-22
| | | | | 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.
* ao_coreaudio: use new option APIGravatar Stefano Pigozzi2013-07-22
|
* ao_coreaudio: switch properties getters to tallocGravatar Stefano Pigozzi2013-07-22
|
* ao_coreaudio: revert to original device format on digital uninitGravatar Stefano Pigozzi2013-07-22
| | | | | | 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).
* ao_coreaudio: refactor chmap detectionGravatar Stefano Pigozzi2013-07-22
| | | | | | 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.
* ao_coreaudio: refactor properties codeGravatar Stefano Pigozzi2013-07-22
| | | | | | | | 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: move utils functions to snake_caseGravatar Stefano Pigozzi2013-07-22
|
* ao_coreaudio: split ao_coreaudio_common in two filesGravatar Stefano Pigozzi2013-07-22
| | | | | | | | | * 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
* ao_coreaudio: store asbd only when selectedGravatar Stefano Pigozzi2013-07-22
| | | | | Previous code needlessly stored the input asbd before actually testing it's support against the hardware.
* ao_coreaudio: fallback to waveext on non surround inputsGravatar Stefano Pigozzi2013-07-22
|
* ao_coreaudio: set channel layout based on hardware queryGravatar Stefano Pigozzi2013-07-22
| | | | this is a wip
* ao_coreaudio: fix regression in digital stream selectionGravatar Stefano Pigozzi2013-07-22
| | | | | | 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.
* ao_coreaudio: return errors instead false in init functionsGravatar Stefano Pigozzi2013-07-22
|
* ao_coreaudio: remove useless function declarationGravatar Stefano Pigozzi2013-07-22
|
* ao_coreaudio: only set chmap_sel info for lpcmGravatar Stefano Pigozzi2013-07-22
|
* ao_coreaudio: set channel layout bitmapGravatar Stefano Pigozzi2013-07-22
|
* ao_coreaudio: move digital detection before asbd creationGravatar Stefano Pigozzi2013-07-22
|
* ao_coreaudio: remove chmap selection if format is digitalGravatar Stefano Pigozzi2013-07-22
|
* ao_coreaudio: remove volume multiplication by 4Gravatar Stefano Pigozzi2013-07-22
| | | | | 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.
* ao_coreaudio: remove device property listener on uninitGravatar Stefano Pigozzi2013-07-22
| | | | Also extract this functionality inside a function in coreaudio_common
* ao_coreaudio: print help string in one goGravatar Stefano Pigozzi2013-07-22
|