]> git.sesse.net Git - vlc/commitdiff
revert 13023 as is doesn't fix anything
authorBenjamin Pracht <bigben@videolan.org>
Wed, 2 Nov 2005 21:41:45 +0000 (21:41 +0000)
committerBenjamin Pracht <bigben@videolan.org>
Wed, 2 Nov 2005 21:41:45 +0000 (21:41 +0000)
modules/audio_output/alsa.c

index 20d31ab3111ad7f8204823517c8b9fdf8b404b72..98bdda7c6053e09b48d96a4c729961549893d225 100644 (file)
@@ -501,24 +501,6 @@ static int Open( vlc_object_t *p_this )
         goto error;
     }
 
-    /* Set rate. */
-    i_old_rate = p_aout->output.output.i_rate;
-#ifdef HAVE_ALSA_NEW_API
-    i_snd_rc = snd_pcm_hw_params_set_rate_near( p_sys->p_snd_pcm, p_hw,
-                                                &(p_aout->output.output.i_rate),
-                                                NULL );
-#else
-    i_snd_rc = snd_pcm_hw_params_set_rate_near( p_sys->p_snd_pcm, p_hw,
-                                                p_aout->output.output.i_rate,
-                                                NULL );
-#endif
-    if( i_snd_rc < 0 || p_aout->output.output.i_rate != i_old_rate )
-    {
-        msg_Warn( p_aout, "The rate %d Hz is not supported by your hardware. "
-                  "Using %d Hz instead.\n", i_old_rate,
-                  p_aout->output.output.i_rate );
-    }
-
     /* Set format. */
     if ( ( i_snd_rc = snd_pcm_hw_params_set_format( p_sys->p_snd_pcm, p_hw,
                                                     i_snd_pcm_format ) ) < 0 )
@@ -565,6 +547,24 @@ static int Open( vlc_object_t *p_this )
         goto error;
     }
 
+    /* Set rate. */
+    i_old_rate = p_aout->output.output.i_rate;
+#ifdef HAVE_ALSA_NEW_API
+    i_snd_rc = snd_pcm_hw_params_set_rate_near( p_sys->p_snd_pcm, p_hw,
+                                                &p_aout->output.output.i_rate,
+                                                NULL );
+#else
+    i_snd_rc = snd_pcm_hw_params_set_rate_near( p_sys->p_snd_pcm, p_hw,
+                                                p_aout->output.output.i_rate,
+                                                NULL );
+#endif
+    if( i_snd_rc < 0 || p_aout->output.output.i_rate != i_old_rate )
+    {
+        msg_Warn( p_aout, "The rate %d Hz is not supported by your hardware. "
+                  "Using %d Hz instead.\n", i_old_rate,
+                  p_aout->output.output.i_rate );
+    }
+
     /* Set buffer size. */
 #ifdef HAVE_ALSA_NEW_API
     if ( ( i_snd_rc = snd_pcm_hw_params_set_buffer_size_near( p_sys->p_snd_pcm,