[vlc-commits] audiounit: cast OSStatus correctly for debug output

Felix Paul Kühne git at videolan.org
Sun Apr 27 16:25:41 CEST 2014


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Sun Apr 27 16:25:01 2014 +0200| [88a0e2d7f85998cffa2535b8ad5ebf799f3f79c7] | committer: Felix Paul Kühne

audiounit: cast OSStatus correctly for debug output

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=88a0e2d7f85998cffa2535b8ad5ebf799f3f79c7
---

 modules/audio_output/audiounit_ios.c |   19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/modules/audio_output/audiounit_ios.c b/modules/audio_output/audiounit_ios.c
index 1408dc5..cd45d10 100644
--- a/modules/audio_output/audiounit_ios.c
+++ b/modules/audio_output/audiounit_ios.c
@@ -182,7 +182,7 @@ static int StartAnalog(audio_output_t *p_aout, audio_sample_format_t *fmt)
 
     status = AudioComponentInstanceNew(p_sys->au_component, &p_sys->au_unit);
     if (status != noErr) {
-        msg_Warn(p_aout, "we cannot open our audio component (%li)", status);
+        msg_Warn(p_aout, "we cannot open our audio component (%i)", (int)status);
         return false;
     }
 
@@ -194,7 +194,7 @@ static int StartAnalog(audio_output_t *p_aout, audio_sample_format_t *fmt)
                                   &flag,
                                   sizeof(flag));
     if (status != noErr)
-        msg_Warn(p_aout, "failed to set IO mode (%li)", status);
+        msg_Warn(p_aout, "failed to set IO mode (%i)", (int)status);
 
     /* Get the current format */
     AudioStreamBasicDescription streamDescription;
@@ -220,7 +220,7 @@ static int StartAnalog(audio_output_t *p_aout, audio_sample_format_t *fmt)
                                   &streamDescription,
                                   i_param_size);
     if (status != noErr) {
-        msg_Err(p_aout, "failed to set stream format (%li)", status);
+        msg_Err(p_aout, "failed to set stream format (%i)", (int)status);
         return false;
     }
     msg_Dbg(p_aout, STREAM_FORMAT_MSG("we set the AU format: " , streamDescription));
@@ -233,7 +233,7 @@ static int StartAnalog(audio_output_t *p_aout, audio_sample_format_t *fmt)
                                   &streamDescription,
                                   &i_param_size);
     if (status != noErr)
-        msg_Warn(p_aout, "failed to verify stream format (%li)", status);
+        msg_Warn(p_aout, "failed to verify stream format (%i)", (int)status);
     msg_Dbg(p_aout, STREAM_FORMAT_MSG("the actual set AU format is " , streamDescription));
 
     /* Do the last VLC aout setups */
@@ -248,14 +248,14 @@ static int StartAnalog(audio_output_t *p_aout, audio_sample_format_t *fmt)
                             kAudioUnitScope_Input,
                             0, &callback, sizeof(callback));
     if (status != noErr) {
-        msg_Err(p_aout, "render callback setup failed (%li)", status);
+        msg_Err(p_aout, "render callback setup failed (%i)", (int)status);
         return false;
     }
 
     /* AU init */
     status = AudioUnitInitialize(p_sys->au_unit);
     if (status != noErr) {
-        msg_Err(p_aout, "failed to init AudioUnit (%li)", status);
+        msg_Err(p_aout, "failed to init AudioUnit (%i)", (int)status);
         return false;
     }
 
@@ -273,8 +273,9 @@ static int StartAnalog(audio_output_t *p_aout, audio_sample_format_t *fmt)
 	AudioSessionSetProperty(kAudioSessionProperty_AudioCategory, sizeof(sessionCategory),&sessionCategory);
 	AudioSessionSetActive(true);
 
+    /* start the unit */
     status = AudioOutputUnitStart(p_sys->au_unit);
-    msg_Dbg(p_aout, "audio output unit started: %li", status);
+    msg_Dbg(p_aout, "audio output unit started: %i", (int)status);
 
     return true;
 }
@@ -289,11 +290,11 @@ static void Stop(audio_output_t *p_aout)
     if (p_sys->au_unit) {
         status = AudioOutputUnitStop(p_sys->au_unit);
         if (status != noErr)
-            msg_Warn(p_aout, "failed to stop AudioUnit (%li)", status);
+            msg_Warn(p_aout, "failed to stop AudioUnit (%i)", (int)status);
 
         status = AudioComponentInstanceDispose(p_sys->au_unit);
         if (status != noErr)
-            msg_Warn(p_aout, "failed to dispose Audio Component instance (%li)", status);
+            msg_Warn(p_aout, "failed to dispose Audio Component instance (%i)", (int)status);
     }
     p_sys->i_bytes_per_sample = 0;
 



More information about the vlc-commits mailing list