Commit ea8c73a7 authored by Sam Hocevar's avatar Sam Hocevar

  * ./src/audio_output/aout_s16.c: fixed a segfault. It may have unexpected
    side effects because I don't know this part of the code, but at least
    it doesn't crash anymore.
  * ./plugins/beos/beos.cpp: first attempt at porting the BeOS plugin to the
    new video output and module systems. Doesn't work nor even compile yet.
  * ./configure.in: we now check the gtk-config version.
parent 569eb5e1
...@@ -6964,6 +6964,10 @@ fi ...@@ -6964,6 +6964,10 @@ fi
if test -x ${GTK_CONFIG} if test -x ${GTK_CONFIG}
then then
if expr 1.2.0 \> `$GTK_CONFIG --version` >/dev/null
then
{ echo "configure: error: Your development package for Gtk+ is too old, you need at least version 1.2.0. Please upgrade and try again. Alternatively you can also configure with --disable-gtk." 1>&2; exit 1; }
fi
CFLAGS_GTK="`${GTK_CONFIG} --cflags gtk`" CFLAGS_GTK="`${GTK_CONFIG} --cflags gtk`"
LIB_GTK="`${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`" LIB_GTK="`${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
fi fi
...@@ -6975,17 +6979,17 @@ fi ...@@ -6975,17 +6979,17 @@ fi
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:6979: checking for $ac_hdr" >&5 echo "configure:6983: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 6984 "configure" #line 6988 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6989: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:6993: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -7042,17 +7046,17 @@ if test x$enable_x11 != xno && ...@@ -7042,17 +7046,17 @@ if test x$enable_x11 != xno &&
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:7046: checking for $ac_hdr" >&5 echo "configure:7050: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 7051 "configure" #line 7055 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7056: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:7060: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -7105,17 +7109,17 @@ if test x$enable_xvideo != xno && ...@@ -7105,17 +7109,17 @@ if test x$enable_xvideo != xno &&
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:7109: checking for $ac_hdr" >&5 echo "configure:7113: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 7114 "configure" #line 7118 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7119: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:7123: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -7155,17 +7159,17 @@ if test "${enable_alsa+set}" = set; then ...@@ -7155,17 +7159,17 @@ if test "${enable_alsa+set}" = set; then
then then
ac_safe=`echo "alsa/asoundlib.h" | sed 'y%./+-%__p_%'` ac_safe=`echo "alsa/asoundlib.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for alsa/asoundlib.h""... $ac_c" 1>&6 echo $ac_n "checking for alsa/asoundlib.h""... $ac_c" 1>&6
echo "configure:7159: checking for alsa/asoundlib.h" >&5 echo "configure:7163: checking for alsa/asoundlib.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 7164 "configure" #line 7168 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <alsa/asoundlib.h> #include <alsa/asoundlib.h>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7169: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:7173: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -7182,7 +7186,7 @@ fi ...@@ -7182,7 +7186,7 @@ fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6 echo "$ac_t""yes" 1>&6
echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6 echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6
echo "configure:7186: checking for main in -lasound" >&5 echo "configure:7190: checking for main in -lasound" >&5
ac_lib_var=`echo asound'_'main | sed 'y%./+-%__p_%'` ac_lib_var=`echo asound'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -7190,14 +7194,14 @@ else ...@@ -7190,14 +7194,14 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lasound $LIBS" LIBS="-lasound $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 7194 "configure" #line 7198 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
main() main()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:7201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:7205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
......
...@@ -1164,6 +1164,10 @@ then ...@@ -1164,6 +1164,10 @@ then
AC_PATH_PROG(GTK_CONFIG, gtk-config, no, $GTK_PATH) AC_PATH_PROG(GTK_CONFIG, gtk-config, no, $GTK_PATH)
if test -x ${GTK_CONFIG} if test -x ${GTK_CONFIG}
then then
if expr 1.2.0 \> `$GTK_CONFIG --version` >/dev/null
then
AC_MSG_ERROR([Your development package for Gtk+ is too old, you need at least version 1.2.0. Please upgrade and try again. Alternatively you can also configure with --disable-gtk.])
fi
CFLAGS_GTK="`${GTK_CONFIG} --cflags gtk`" CFLAGS_GTK="`${GTK_CONFIG} --cflags gtk`"
LIB_GTK="`${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`" LIB_GTK="`${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
fi fi
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* beos.cpp : BeOS plugin for vlc * beos.cpp : BeOS plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN * Copyright (C) 2000, 2001 VideoLAN
* $Id: beos.cpp,v 1.15 2001/12/30 07:09:54 sam Exp $ * $Id: beos.cpp,v 1.16 2002/01/05 18:25:48 sam Exp $
* *
* Authors: Jean-Marc Dressler <polux@via.ecp.fr> * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -48,11 +48,11 @@ ADD_WINDOW( "Configuration for BeOS module" ) ...@@ -48,11 +48,11 @@ ADD_WINDOW( "Configuration for BeOS module" )
MODULE_CONFIG_STOP MODULE_CONFIG_STOP
MODULE_INIT_START MODULE_INIT_START
p_module->i_capabilities = MODULE_CAPABILITY_NULL SET_DESCRIPTION( "BeOS standard API module" )
| MODULE_CAPABILITY_AOUT ADD_CAPABILITY( INTF, 100 )
| MODULE_CAPABILITY_VOUT ADD_CAPABILITY( VOUT, 100 )
| MODULE_CAPABILITY_INTF; ADD_CAPABILITY( AOUT, 100 )
p_module->psz_longname = "BeOS standard API module"; ADD_SHORTCUT( "beos" )
MODULE_INIT_STOP MODULE_INIT_STOP
MODULE_ACTIVATE_START MODULE_ACTIVATE_START
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vout_beos.cpp: beos video output display method * vout_beos.cpp: beos video output display method
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN * Copyright (C) 2000, 2001 VideoLAN
* $Id: vout_beos.cpp,v 1.36 2001/12/30 07:09:54 sam Exp $ * $Id: vout_beos.cpp,v 1.37 2002/01/05 18:25:48 sam Exp $
* *
* Authors: Jean-Marc Dressler <polux@via.ecp.fr> * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -48,8 +48,8 @@ extern "C" ...@@ -48,8 +48,8 @@ extern "C"
#include "VideoWindow.h" #include "VideoWindow.h"
#define BITS_PER_PLANE 32 #define BITS_PER_PLANE 16
#define BYTES_PER_PIXEL 4 #define BYTES_PER_PIXEL 2
/***************************************************************************** /*****************************************************************************
* vout_sys_t: BeOS video output method descriptor * vout_sys_t: BeOS video output method descriptor
...@@ -61,7 +61,6 @@ typedef struct vout_sys_s ...@@ -61,7 +61,6 @@ typedef struct vout_sys_s
{ {
VideoWindow * p_window; VideoWindow * p_window;
byte_t * pp_buffer[2];
s32 i_width; s32 i_width;
s32 i_height; s32 i_height;
} vout_sys_t; } vout_sys_t;
...@@ -94,10 +93,8 @@ BWindow *beos_GetAppWindow(char *name) ...@@ -94,10 +93,8 @@ BWindow *beos_GetAppWindow(char *name)
} }
/**************************************************************************** /****************************************************************************
*
* DrawingThread : thread that really does the drawing * DrawingThread : thread that really does the drawing
**************************************************************************** ****************************************************************************/
*/
int32 Draw(void *data) int32 Draw(void *data)
{ {
//rudolf: sync init: //rudolf: sync init:
...@@ -295,8 +292,13 @@ VideoWindow::VideoWindow( int width, int height, ...@@ -295,8 +292,13 @@ VideoWindow::VideoWindow( int width, int height,
voutWindow->AddChild(view); voutWindow->AddChild(view);
/* Bitmap mode overlay not available */ /* Bitmap mode overlay not available */
#if BITS_PER_PLANE == 32
bitmap[0] = new BBitmap( voutWindow->Bounds(), B_RGB32); bitmap[0] = new BBitmap( voutWindow->Bounds(), B_RGB32);
bitmap[1] = new BBitmap( voutWindow->Bounds(), B_RGB32); bitmap[1] = new BBitmap( voutWindow->Bounds(), B_RGB32);
#else
bitmap[0] = new BBitmap( voutWindow->Bounds(), B_RGB32);
bitmap[1] = new BBitmap( voutWindow->Bounds(), B_RGB32);
#endif
memset(bitmap[0]->Bits(), 0, bitmap[0]->BitsLength()); memset(bitmap[0]->Bits(), 0, bitmap[0]->BitsLength());
memset(bitmap[1]->Bits(), 0, bitmap[1]->BitsLength()); memset(bitmap[1]->Bits(), 0, bitmap[1]->BitsLength());
...@@ -353,7 +355,11 @@ void VideoWindow::drawBuffer(int bufferIndex) ...@@ -353,7 +355,11 @@ void VideoWindow::drawBuffer(int bufferIndex)
*****************************************************************************/ *****************************************************************************/
VLCView::VLCView(BRect bounds) : BView(bounds, "", B_FOLLOW_ALL, B_WILL_DRAW) VLCView::VLCView(BRect bounds) : BView(bounds, "", B_FOLLOW_ALL, B_WILL_DRAW)
{ {
#if BITS_PER_PLANE == 32
SetViewColor(B_TRANSPARENT_32_BIT); SetViewColor(B_TRANSPARENT_32_BIT);
#else
SetViewColor(B_TRANSPARENT_16_BIT);
#endif
} }
/***************************************************************************** /*****************************************************************************
...@@ -379,12 +385,13 @@ extern "C" ...@@ -379,12 +385,13 @@ extern "C"
* Local prototypes * Local prototypes
*****************************************************************************/ *****************************************************************************/
static int vout_Probe ( probedata_t *p_data ); static int vout_Probe ( probedata_t *p_data );
static int vout_Create ( struct vout_thread_s * ); static int vout_Create ( vout_thread_t * );
static int vout_Init ( struct vout_thread_s * ); static int vout_Init ( vout_thread_t * );
static void vout_End ( struct vout_thread_s * ); static void vout_End ( vout_thread_t * );
static void vout_Destroy ( struct vout_thread_s * ); static void vout_Destroy ( vout_thread_t * );
static int vout_Manage ( struct vout_thread_s * ); static int vout_Manage ( vout_thread_t * );
static void vout_Display ( struct vout_thread_s * ); static void vout_Display ( vout_thread_t *, picture_t * );
static void vout_Render ( vout_thread_t *, picture_t * );
static int BeosOpenDisplay ( vout_thread_t *p_vout ); static int BeosOpenDisplay ( vout_thread_t *p_vout );
static void BeosCloseDisplay( vout_thread_t *p_vout ); static void BeosCloseDisplay( vout_thread_t *p_vout );
...@@ -402,7 +409,7 @@ void _M( vout_getfunctions )( function_list_t * p_function_list ) ...@@ -402,7 +409,7 @@ void _M( vout_getfunctions )( function_list_t * p_function_list )
p_function_list->functions.vout.pf_destroy = vout_Destroy; p_function_list->functions.vout.pf_destroy = vout_Destroy;
p_function_list->functions.vout.pf_manage = vout_Manage; p_function_list->functions.vout.pf_manage = vout_Manage;
p_function_list->functions.vout.pf_display = vout_Display; p_function_list->functions.vout.pf_display = vout_Display;
p_function_list->functions.vout.pf_setpalette = NULL; p_function_list->functions.vout.pf_render = vout_Render;
} }
/***************************************************************************** /*****************************************************************************
...@@ -435,8 +442,19 @@ int vout_Create( vout_thread_t *p_vout ) ...@@ -435,8 +442,19 @@ int vout_Create( vout_thread_t *p_vout )
return( 1 ); return( 1 );
} }
/* force scaling off */ if( p_vout->render.i_height * p_vout->render.i_aspect
p_vout->b_scale = false; >= p_vout->render.i_width * VOUT_ASPECT_FACTOR )
{
p_vout->p_sys->i_width = p_vout->render.i_height
* p_vout->render.i_aspect / VOUT_ASPECT_FACTOR;
p_vout->p_sys->i_height = p_vout->render.i_height;
}
else
{
p_vout->p_sys->i_width = p_vout->render.i_width;
p_vout->p_sys->i_height = p_vout->render.i_width
* VOUT_ASPECT_FACTOR / p_vout->render.i_aspect;
}
/* Open and initialize device */ /* Open and initialize device */
if( BeosOpenDisplay( p_vout ) ) if( BeosOpenDisplay( p_vout ) )
...@@ -500,13 +518,21 @@ int vout_Manage( vout_thread_t *p_vout ) ...@@ -500,13 +518,21 @@ int vout_Manage( vout_thread_t *p_vout )
return( 0 ); return( 0 );
} }
/*****************************************************************************
* vout_Render: render previously calculated output
*****************************************************************************/
void vout_Render( vout_thread_t *p_vout, picture_t *p_pic )
{
;
}
/***************************************************************************** /*****************************************************************************
* vout_Display: displays previously rendered output * vout_Display: displays previously rendered output
***************************************************************************** *****************************************************************************
* This function send the currently rendered image to BeOS image, waits until * This function send the currently rendered image to BeOS image, waits until
* it is displayed and switch the two rendering buffers, preparing next frame. * it is displayed and switch the two rendering buffers, preparing next frame.
*****************************************************************************/ *****************************************************************************/
void vout_Display( vout_thread_t *p_vout ) void vout_Display( vout_thread_t *p_vout, picture_t *p_pic )
{ {
VideoWindow * p_win = p_vout->p_sys->p_window; VideoWindow * p_win = p_vout->p_sys->p_window;
...@@ -541,16 +567,17 @@ static int BeosOpenDisplay( vout_thread_t *p_vout ) ...@@ -541,16 +567,17 @@ static int BeosOpenDisplay( vout_thread_t *p_vout )
p_vout->p_sys->p_window = p_win; p_vout->p_sys->p_window = p_win;
/* set the system to 32bits always /* set the system to 32bits always
let BeOS do all the work */ let BeOS do all the work */
p_vout->b_YCbr = false; p_vout->p_sys->i_width = p_win->i_width + 1;
p_vout->p_sys->i_height = p_win->i_height + 1;
#if 0
p_vout->i_screen_depth = BITS_PER_PLANE; p_vout->i_screen_depth = BITS_PER_PLANE;
p_vout->i_bytes_per_pixel = BYTES_PER_PIXEL; p_vout->i_bytes_per_pixel = BYTES_PER_PIXEL;
p_vout->i_width = p_win->i_width + 1; p_vout->i_bytes_per_line = p_vout->p_sys->i_width * BYTES_PER_PIXEL;
p_vout->i_height = p_win->i_height + 1;
p_vout->i_bytes_per_line = p_vout->i_width * BYTES_PER_PIXEL;
p_vout->i_red_mask = 0xff0000; p_vout->i_red_mask = 0xff0000;
p_vout->i_green_mask = 0x00ff00; p_vout->i_green_mask = 0x00ff00;
p_vout->i_blue_mask = 0x0000ff; p_vout->i_blue_mask = 0x0000ff;
#endif
return( 0 ); return( 0 );
} }
......
...@@ -133,7 +133,7 @@ static void S16StereoPlay( aout_thread_t * p_aout, aout_fifo_t * p_fifo ) ...@@ -133,7 +133,7 @@ static void S16StereoPlay( aout_thread_t * p_aout, aout_fifo_t * p_fifo )
} }
p_fifo->l_units -= p_aout->l_units; p_fifo->l_units -= p_aout->l_units;
} }
else else /* p_fifo->l_units <= p_aout->l_units */
{ {
/* p_aout->b_stereo == 1 */ /* p_aout->b_stereo == 1 */
while ( l_buffer < (p_fifo->l_units << 1) ) while ( l_buffer < (p_fifo->l_units << 1) )
...@@ -164,7 +164,7 @@ static void S16StereoPlay( aout_thread_t * p_aout, aout_fifo_t * p_fifo ) ...@@ -164,7 +164,7 @@ static void S16StereoPlay( aout_thread_t * p_aout, aout_fifo_t * p_fifo )
} }
p_fifo->l_units -= p_aout->l_units; p_fifo->l_units -= p_aout->l_units;
} }
else else /* p_fifo->l_units <= p_aout->l_units */
{ {
/* p_aout->b_stereo == 1 */ /* p_aout->b_stereo == 1 */
while ( l_buffer < (p_fifo->l_units << 1) ) while ( l_buffer < (p_fifo->l_units << 1) )
...@@ -216,10 +216,10 @@ static void S16StereoPlay( aout_thread_t * p_aout, aout_fifo_t * p_fifo ) ...@@ -216,10 +216,10 @@ static void S16StereoPlay( aout_thread_t * p_aout, aout_fifo_t * p_fifo )
p_fifo->l_units -= l_units; p_fifo->l_units -= l_units;
break; break;
} }
else else /* p_fifo->l_units <= l_units */
{ {
/* p_aout->b_stereo == 1 */ /* p_aout->b_stereo == 1 */
l_buffer_limit = l_buffer + (p_fifo->l_units << 1); l_buffer_limit = p_fifo->l_units << 1;
while ( l_buffer < l_buffer_limit ) while ( l_buffer < l_buffer_limit )
{ {
...@@ -287,10 +287,10 @@ static void S16StereoPlay( aout_thread_t * p_aout, aout_fifo_t * p_fifo ) ...@@ -287,10 +287,10 @@ static void S16StereoPlay( aout_thread_t * p_aout, aout_fifo_t * p_fifo )
p_fifo->l_units -= l_units; p_fifo->l_units -= l_units;
break; break;
} }
else else /* p_fifo->l_units <= l_units */
{ {
/* p_aout->b_stereo == 1 */ /* p_aout->b_stereo == 1 */
l_buffer_limit = l_buffer + (p_fifo->l_units << 1); l_buffer_limit = p_fifo->l_units << 1;
while ( l_buffer < l_buffer_limit ) while ( l_buffer < l_buffer_limit )
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment