diff options
author | Max Kellermann <max@duempel.org> | 2013-08-03 21:00:50 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-08-03 21:37:56 +0200 |
commit | d1e7b4e38136f9342aad76c685a13adf0e69f869 (patch) | |
tree | 49643b937ddfe735511b566a71398da5a945d7aa /src/OutputControl.cxx | |
parent | 67f591a9ce60651da41afc499bd9a22e25314e35 (diff) |
audio_format: convert to C++
Diffstat (limited to 'src/OutputControl.cxx')
-rw-r--r-- | src/OutputControl.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/OutputControl.cxx b/src/OutputControl.cxx index a11b66116..b8f3a3ea4 100644 --- a/src/OutputControl.cxx +++ b/src/OutputControl.cxx @@ -139,14 +139,14 @@ audio_output_disable(struct audio_output *ao) */ static bool audio_output_open(struct audio_output *ao, - const struct audio_format *audio_format, + const AudioFormat audio_format, const struct music_pipe *mp) { bool open; assert(ao != NULL); assert(ao->allow_play); - assert(audio_format_valid(audio_format)); + assert(audio_format.IsValid()); assert(mp != NULL); if (ao->fail_timer != NULL) { @@ -154,8 +154,7 @@ audio_output_open(struct audio_output *ao, ao->fail_timer = NULL; } - if (ao->open && - audio_format_equals(audio_format, &ao->in_audio_format)) { + if (ao->open && audio_format == ao->in_audio_format) { assert(ao->pipe == mp || (ao->always_on && ao->pause)); @@ -176,7 +175,7 @@ audio_output_open(struct audio_output *ao, return true; } - ao->in_audio_format = *audio_format; + ao->in_audio_format = audio_format; ao->chunk = NULL; ao->pipe = mp; @@ -225,7 +224,7 @@ audio_output_close_locked(struct audio_output *ao) bool audio_output_update(struct audio_output *ao, - const struct audio_format *audio_format, + const AudioFormat audio_format, const struct music_pipe *mp) { assert(mp != NULL); |