diff options
author | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2013-07-01 08:43:22 +0200 |
---|---|---|
committer | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2013-07-22 21:53:18 +0200 |
commit | 5a4ae428922076b8b741a2d56c3ba5a6865bc3fb (patch) | |
tree | a29c7441fa485a5f2b44fd85d9db1f5fea6c6ceb /audio/out/ao_coreaudio_common.c | |
parent | d3fb585b58710a478c218ccfda5baa54b0e33a67 (diff) | |
download | mpv-5a4ae428922076b8b741a2d56c3ba5a6865bc3fb.tar.bz2 mpv-5a4ae428922076b8b741a2d56c3ba5a6865bc3fb.tar.xz |
ao_coreaudio: change all ++var to var++
Luckily they all were inside for loops so the functionality does not actually
change.
Diffstat (limited to 'audio/out/ao_coreaudio_common.c')
-rw-r--r-- | audio/out/ao_coreaudio_common.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/audio/out/ao_coreaudio_common.c b/audio/out/ao_coreaudio_common.c index 6f35733c63..a3b7a741e3 100644 --- a/audio/out/ao_coreaudio_common.c +++ b/audio/out/ao_coreaudio_common.c @@ -235,7 +235,7 @@ static int AudioStreamSupportsDigital(AudioStreamID stream) } const int n_formats = size / sizeof(AudioStreamRangedDescription); - for (int i = 0; i < n_formats; ++i) { + for (int i = 0; i < n_formats; i++) { AudioStreamBasicDescription asbd = formats[i].mFormat; ca_print_asbd("supported format:", &(asbd)); if (AudioFormatIsDigital(asbd)) { @@ -264,7 +264,7 @@ static int AudioDeviceSupportsDigital(AudioDeviceID device) } const int n_streams = size / sizeof(AudioStreamID); - for (int i = 0; i < n_streams; ++i) { + for (int i = 0; i < n_streams; i++) { if (AudioStreamSupportsDigital(streams[i])) { free(streams); return CONTROL_OK; @@ -280,11 +280,9 @@ static OSStatus ca_property_listener(AudioObjectPropertySelector selector, const AudioObjectPropertyAddress addresses[], void *data) { - // TODO: ++i seems wrong in this context. Check out if it was a programmer - // mistake void *talloc_ctx = talloc_new(NULL); - for (int i = 0; i < n_addresses; ++i) { + for (int i = 0; i < n_addresses; i++) { if (addresses[i].mSelector == selector) { ca_msg(MSGL_WARN, "event: property %s changed\n", fourcc_repr(talloc_ctx, selector)); @@ -418,8 +416,8 @@ static int AudioStreamChangeFormat(AudioStreamID i_stream_id, * it is also not Atomic, in its behaviour. * Therefore we check 5 times before we really give up. */ bool format_set = CONTROL_FALSE; - for (int i = 0; !format_set && i < 5; ++i) { - for (int j = 0; !stream_format_changed && j < 50; ++j) + for (int i = 0; !format_set && i < 5; i++) { + for (int j = 0; !stream_format_changed && j < 50; j++) mp_sleep_us(10000); if (stream_format_changed) { |