From 58120d0bc97f65c7519526696e5c564316ed7fe7 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 9 Feb 2005 13:22:23 +0000 Subject: [PATCH] Added getenv OSG_XINE_AUDIO_DRIVER to xine plugin to allow users to set what the default audio to use --- src/osgPlugins/xine/ReaderWriterXine.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/osgPlugins/xine/ReaderWriterXine.cpp b/src/osgPlugins/xine/ReaderWriterXine.cpp index e3a833b2d..ced483e17 100644 --- a/src/osgPlugins/xine/ReaderWriterXine.cpp +++ b/src/osgPlugins/xine/ReaderWriterXine.cpp @@ -57,8 +57,6 @@ class ReaderWriterXine : public osgDB::ReaderWriter ReaderWriterXine() { - osg::notify(osg::NOTICE)<<"I'm here"<user_data = imageStream; visual->callback = my_render_frame; - // set up drivers + + + + // set up video driver xine_video_port_t* vo = xine_open_video_driver(_xine, "rgb", XINE_VISUAL_TYPE_RGBOUT, (void*)visual); - xine_audio_port_t* ao = xine_open_audio_driver(_xine, "auto", NULL); + + // set up audio driver + char* audio_driver = getenv("OSG_XINE_AUDIO_DRIVER"); + xine_audio_port_t* ao = audio_driver ? xine_open_audio_driver(_xine, audio_driver, NULL) : xine_open_audio_driver(_xine, "none", NULL); if (!vo) { osg::notify(osg::NOTICE)<<"Failed to create video driver"<