audio: add test for the new audio device functions
authorRémi Denis-Courmont <remi@remlab.net>
Thu, 15 May 2014 13:47:35 +0000 (21:47 +0800)
committerRémi Denis-Courmont <remi@remlab.net>
Thu, 15 May 2014 13:10:57 +0000 (21:10 +0800)
test/libvlc/media_player.c

index 258d825..43dd44c 100644 (file)
@@ -71,6 +71,13 @@ static void test_audio_video(libvlc_media_player_t *mp)
     libvlc_video_set_scale(mp, 0.);
     libvlc_video_set_scale(mp, 0.); /* no-op */
     assert(libvlc_video_get_scale(mp) == 0.);
     libvlc_video_set_scale(mp, 0.);
     libvlc_video_set_scale(mp, 0.); /* no-op */
     assert(libvlc_video_get_scale(mp) == 0.);
+
+    libvlc_audio_output_device_t *aouts = libvlc_audio_output_device_enum(mp);
+    for (libvlc_audio_output_device_t *e = aouts; e != NULL; e = e->p_next)
+    {
+        libvlc_audio_output_device_set( mp, NULL, e->psz_device );
+    }
+    libvlc_audio_output_device_list_release( aouts );
 }
 
 static void test_media_player_set_media(const char** argv, int argc)
 }
 
 static void test_media_player_set_media(const char** argv, int argc)