]> git.sesse.net Git - mlt/commitdiff
Allow user to set alsa device
authorj-b-m <j-b-m@d19143bc-622f-0410-bfdd-b5b2a6649095>
Thu, 1 Feb 2007 19:13:49 +0000 (19:13 +0000)
committerj-b-m <j-b-m@d19143bc-622f-0410-bfdd-b5b2a6649095>
Thu, 1 Feb 2007 19:13:49 +0000 (19:13 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@949 d19143bc-622f-0410-bfdd-b5b2a6649095

src/modules/sdl/consumer_sdl_preview.c

index f79c1b303b5fa87613c8ed4e4a21a064264ffeee..9842070af330699e0a064642becacb874a0387b4 100644 (file)
@@ -142,6 +142,7 @@ static int consumer_start( mlt_consumer parent )
 
                char *window_id = mlt_properties_get( properties, "window_id" );
                char *audio_driver = mlt_properties_get( properties, "audio_driver" );
+               char *audio_device = mlt_properties_get( properties, "audio_device" );
                int progressive = mlt_properties_get_int( properties, "progressive" ) | mlt_properties_get_int( properties, "deinterlace" );
 
                consumer_stop( parent );
@@ -156,6 +157,9 @@ static int consumer_start( mlt_consumer parent )
                if ( audio_driver != NULL )
                        setenv( "SDL_AUDIODRIVER", audio_driver, 1 );
 
+               if ( audio_device != NULL )
+                       setenv( "AUDIODEV", audio_device, 1 );
+
                if ( SDL_Init( SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE ) < 0 )
                {
                        fprintf( stderr, "Failed to initialize SDL: %s\n", SDL_GetError() );