diff options
author | Martin Herkt <lachs0r@srsfckn.biz> | 2016-06-25 02:25:44 +0200 |
---|---|---|
committer | Martin Herkt <lachs0r@srsfckn.biz> | 2016-06-25 02:25:44 +0200 |
commit | ad56f2c46ac6deec86870ec10f2a11a644df07d4 (patch) | |
tree | 89f2d90c5586560911e67c872b530c77f151168d /audio/out/ao_coreaudio_utils.c | |
parent | 0536841647ef7931bffb4386d8ffbb5b2b568e8a (diff) | |
parent | 393bb2a565dc1e27812e1dd20747814892f80da2 (diff) | |
download | mpv-ad56f2c46ac6deec86870ec10f2a11a644df07d4.tar.bz2 mpv-ad56f2c46ac6deec86870ec10f2a11a644df07d4.tar.xz |
Merge branch 'master' into release/current
Diffstat (limited to 'audio/out/ao_coreaudio_utils.c')
-rw-r--r-- | audio/out/ao_coreaudio_utils.c | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/audio/out/ao_coreaudio_utils.c b/audio/out/ao_coreaudio_utils.c index 6b5d8a7195..8f9690fc22 100644 --- a/audio/out/ao_coreaudio_utils.c +++ b/audio/out/ao_coreaudio_utils.c @@ -323,6 +323,9 @@ bool ca_stream_supports_compressed(struct ao *ao, AudioStreamID stream) for (int i = 0; i < n_formats; i++) { AudioStreamBasicDescription asbd = formats[i].mFormat; + + ca_print_asbd(ao, "- ", &asbd); + if (ca_formatid_is_compressed(asbd.mFormatID)) { talloc_free(formats); return true; @@ -334,30 +337,6 @@ coreaudio_error: return false; } -bool ca_device_supports_compressed(struct ao *ao, AudioDeviceID device) -{ - AudioStreamID *streams = NULL; - size_t n_streams; - - /* Retrieve all the output streams. */ - OSStatus err = - CA_GET_ARY_O(device, kAudioDevicePropertyStreams, &streams, &n_streams); - - CHECK_CA_ERROR("could not get number of streams."); - - for (int i = 0; i < n_streams; i++) { - if (ca_stream_supports_compressed(ao, streams[i])) { - talloc_free(streams); - return true; - } - } - - talloc_free(streams); - -coreaudio_error: - return false; -} - OSStatus ca_lock_device(AudioDeviceID device, pid_t *pid) { *pid = getpid(); |