From a6bb3a1fe860e3925aef91ee9f67c50e669803e0 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Wed, 20 Nov 2002 16:43:33 +0000 Subject: [PATCH] * ./modules/audio_output/waveout.c: audio output now works under WinCE using the waveout module. * ./bootstrap: we ignore comments when parsing makefiles. * ./modules/audio_filter/converter/fixed32tofloat32.c: changed this module so that it also does float32tofixed32. * ./modules/*: ported a few other modules to WinCE (most of the time it's just a #include that needs to be removed). --- bootstrap | 4 +- evc/vlc.c | 4 +- evc/vlc.vcw | 96 +++++++++++++++++++ modules/audio_filter/channel_mixer/trivial.c | 3 +- .../audio_filter/converter/fixed32tofloat32.c | 55 ++++++++--- modules/audio_filter/converter/fixed32tos16.c | 3 +- modules/audio_filter/converter/float32tos16.c | 3 +- modules/audio_filter/converter/float32tos8.c | 3 +- modules/audio_filter/converter/float32tou16.c | 3 +- modules/audio_filter/converter/float32tou8.c | 3 +- modules/audio_filter/converter/s16tofloat32.c | 3 +- .../audio_filter/converter/s16tofloat32swab.c | 3 +- modules/audio_filter/converter/s8tofloat32.c | 3 +- modules/audio_filter/converter/u8tofloat32.c | 3 +- modules/audio_filter/resampler/linear.c | 3 +- modules/audio_filter/resampler/trivial.c | 3 +- modules/audio_filter/resampler/ugly.c | 3 +- modules/audio_mixer/float32.c | 3 +- modules/audio_mixer/spdif.c | 3 +- modules/audio_mixer/trivial.c | 3 +- modules/audio_output/waveout.c | 22 ++++- share/resource.h | 9 +- share/vlc_wince_rc.rc | 25 ++++- 23 files changed, 205 insertions(+), 58 deletions(-) diff --git a/bootstrap b/bootstrap index f2c2dff2d6..3f13a3ba84 100755 --- a/bootstrap +++ b/bootstrap @@ -1,7 +1,7 @@ #! /bin/sh ## bootstrap file for vlc, the VideoLAN Client -## $Id: bootstrap,v 1.30 2002/11/20 08:58:20 sam Exp $ +## $Id: bootstrap,v 1.31 2002/11/20 16:43:32 sam Exp $ ## ## Authors: Samuel Hocevar @@ -204,7 +204,7 @@ EOF # this is an attempt at getting a list of plugin sources... we take the # production and remove everything that does not contain "module", which # means you miss $(NULL), but other variables too. - cfiles=`awk 'BEGIN{a=0}{if(!a&&/^SOURCES_'${plugin}'[^-_a-zA-Z0-9]*=/){a=1;print$0;next;}if(a){if(/^[a-zA-Z]/){exit;}print $0}}' < ${makefile} | tr '\\ ' '\n\n' | sed -ne 's,/,\\\\,g; s/.*modules/modules/p'` + cfiles=`grep -v '[^-_a-zA-Z0-9]*#' ${makefile} | awk 'BEGIN{a=0}{if(!a&&/^SOURCES_'${plugin}'[^-_a-zA-Z0-9]*=/){a=1;print$0;next;}if(a){if(/^[a-zA-Z]/){exit;}print $0}}' | tr '\\ ' '\n\n' | sed -ne 's,/,\\\\,g; s/.*modules/modules/p'` hfiles=`for i in ${cfiles} ; do echo $i ; done | grep '\.h$'` cfiles=`for i in ${cfiles} ; do echo $i ; done | grep -v '\.h$'` for dir in evc msvc diff --git a/evc/vlc.c b/evc/vlc.c index fe93347309..e9c0bbb544 100644 --- a/evc/vlc.c +++ b/evc/vlc.c @@ -2,7 +2,7 @@ * vlc.c: the vlc player, WinCE version ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: vlc.c,v 1.3 2002/11/20 13:37:35 sam Exp $ + * $Id: vlc.c,v 1.4 2002/11/20 16:43:32 sam Exp $ * * Authors: Samuel Hocevar * @@ -53,7 +53,7 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, { int i_ret; int i_argc = 5; - char * ppsz_argv[] = { lpCmdLine, "-vv", "--intf", "dummy", "shovel.mpeg", NULL }; + char * ppsz_argv[] = { lpCmdLine, "-vv", "--intf", "dummy", "shovel.mpeg", /*"washington.mpeg",*/ NULL }; HWND window; MSG message; diff --git a/evc/vlc.vcw b/evc/vlc.vcw index 4a971467a2..78ab4dbbfc 100644 --- a/evc/vlc.vcw +++ b/evc/vlc.vcw @@ -75,6 +75,30 @@ Package=<4> ############################################################################### +Project: "plugin_fixed32tofloat32"=.\plugin_fixed32tofloat32.vcp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "plugin_fixed32tos16"=.\plugin_fixed32tos16.vcp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + Project: "plugin_i420_rgb"=.\plugin_i420_rgb.vcp - Package Owner=<4> Package=<5> @@ -147,6 +171,18 @@ Package=<4> ############################################################################### +Project: "plugin_linear_resampler"=.\plugin_linear_resampler.vcp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + Project: "plugin_memcpy"=.\plugin_memcpy.vcp - Package Owner=<4> Package=<5> @@ -231,6 +267,42 @@ Package=<4> ############################################################################### +Project: "plugin_trivial_channel_mixer"=.\plugin_trivial_channel_mixer.vcp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "plugin_trivial_mixer"=.\plugin_trivial_mixer.vcp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "plugin_trivial_resampler"=.\plugin_trivial_resampler.vcp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + Project: "plugin_ts"=.\plugin_ts.vcp - Package Owner=<4> Package=<5> @@ -243,6 +315,30 @@ Package=<4> ############################################################################### +Project: "plugin_vout_directx"=.\plugin_vout_directx.vcp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "plugin_waveout"=.\plugin_waveout.vcp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + Project: "vlc"=.\vlc.vcp - Package Owner=<4> Package=<5> diff --git a/modules/audio_filter/channel_mixer/trivial.c b/modules/audio_filter/channel_mixer/trivial.c index dccc057afc..9d25c30cdd 100644 --- a/modules/audio_filter/channel_mixer/trivial.c +++ b/modules/audio_filter/channel_mixer/trivial.c @@ -2,7 +2,7 @@ * trivial.c : trivial channel mixer plug-in (drops unwanted channels) ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: trivial.c,v 1.6 2002/11/14 22:38:46 massiot Exp $ + * $Id: trivial.c,v 1.7 2002/11/20 16:43:32 sam Exp $ * * Authors: Christophe Massiot * @@ -24,7 +24,6 @@ /***************************************************************************** * Preamble *****************************************************************************/ -#include #include /* malloc(), free() */ #include diff --git a/modules/audio_filter/converter/fixed32tofloat32.c b/modules/audio_filter/converter/fixed32tofloat32.c index c95fafdc2a..7f1151d9a8 100644 --- a/modules/audio_filter/converter/fixed32tofloat32.c +++ b/modules/audio_filter/converter/fixed32tofloat32.c @@ -2,7 +2,7 @@ * fixed32float32.c : converter from fixed32 to float32 bits integer ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: fixed32tofloat32.c,v 1.10 2002/10/15 23:10:54 massiot Exp $ + * $Id: fixed32tofloat32.c,v 1.11 2002/11/20 16:43:32 sam Exp $ * * Authors: Jean-Paul Saman * @@ -24,7 +24,6 @@ /***************************************************************************** * Preamble *****************************************************************************/ -#include #include /* malloc(), free() */ #include @@ -35,16 +34,18 @@ /***************************************************************************** * Local prototypes *****************************************************************************/ -static int Create ( vlc_object_t * ); +static int Create ( vlc_object_t * ); -static void DoWork ( aout_instance_t *, aout_filter_t *, aout_buffer_t *, - aout_buffer_t * ); +static void FixedToFloat ( aout_instance_t *, aout_filter_t *, aout_buffer_t *, + aout_buffer_t * ); +static void FloatToFixed ( aout_instance_t *, aout_filter_t *, aout_buffer_t *, + aout_buffer_t * ); /***************************************************************************** * Module descriptor *****************************************************************************/ vlc_module_begin(); - set_description( _("audio filter for fixed32->float32 conversion") ); + set_description( _("audio filter for fixed32<->float32 conversion") ); set_capability( "audio filter", 10 ); set_callbacks( Create, NULL ); vlc_module_end(); @@ -58,8 +59,10 @@ static int Create( vlc_object_t *p_this ) { aout_filter_t * p_filter = (aout_filter_t *)p_this; - if ( p_filter->input.i_format != VLC_FOURCC('f','i','3','2') - || p_filter->output.i_format != VLC_FOURCC('f','l','3','2') ) + if( ( p_filter->input.i_format != VLC_FOURCC('f','i','3','2') + || p_filter->output.i_format != VLC_FOURCC('f','l','3','2') ) + && ( p_filter->input.i_format != VLC_FOURCC('f','l','3','2') + || p_filter->output.i_format != VLC_FOURCC('f','i','3','2') ) ) { return -1; } @@ -69,17 +72,25 @@ static int Create( vlc_object_t *p_this ) return -1; } - p_filter->pf_do_work = DoWork; + if( p_filter->input.i_format == VLC_FOURCC('f','i','3','2') ) + { + p_filter->pf_do_work = FixedToFloat; + } + else + { + p_filter->pf_do_work = FloatToFixed; + } + p_filter->b_in_place = 1; return 0; } /***************************************************************************** - * DoWork: convert a buffer + * FixedToFloat: convert a buffer *****************************************************************************/ -static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, - aout_buffer_t * p_in_buf, aout_buffer_t * p_out_buf ) +static void FixedToFloat( aout_instance_t * p_aout, aout_filter_t * p_filter, + aout_buffer_t * p_in_buf, aout_buffer_t * p_out_buf ) { int i; vlc_fixed_t * p_in = (vlc_fixed_t *)p_in_buf->p_buffer; @@ -95,3 +106,23 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, p_out_buf->i_nb_bytes = p_in_buf->i_nb_bytes; } +/***************************************************************************** + * FloatToFixed: convert a buffer + *****************************************************************************/ +static void FloatToFixed( aout_instance_t * p_aout, aout_filter_t * p_filter, + aout_buffer_t * p_in_buf, aout_buffer_t * p_out_buf ) +{ + int i; + float * p_in = (float *)p_in_buf->p_buffer; + vlc_fixed_t * p_out = (vlc_fixed_t *)p_out_buf->p_buffer; + + for ( i = p_in_buf->i_nb_samples + * aout_FormatNbChannels( &p_filter->input ) ; i-- ; ) + { + *p_out++ = (vlc_fixed_t)( *p_in++ * (float)FIXED32_ONE ); + } + + p_out_buf->i_nb_samples = p_in_buf->i_nb_samples; + p_out_buf->i_nb_bytes = p_in_buf->i_nb_bytes; +} + diff --git a/modules/audio_filter/converter/fixed32tos16.c b/modules/audio_filter/converter/fixed32tos16.c index 2095a51c5a..19afddab65 100644 --- a/modules/audio_filter/converter/fixed32tos16.c +++ b/modules/audio_filter/converter/fixed32tos16.c @@ -2,7 +2,7 @@ * fixed32tos16.c : converter from fixed32 to signed 16 bits integer ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: fixed32tos16.c,v 1.7 2002/10/15 23:10:54 massiot Exp $ + * $Id: fixed32tos16.c,v 1.8 2002/11/20 16:43:32 sam Exp $ * * Authors: Jean-Paul Saman * @@ -24,7 +24,6 @@ /***************************************************************************** * Preamble *****************************************************************************/ -#include #include /* malloc(), free() */ #include diff --git a/modules/audio_filter/converter/float32tos16.c b/modules/audio_filter/converter/float32tos16.c index 7cd0eb5da3..f5254684df 100644 --- a/modules/audio_filter/converter/float32tos16.c +++ b/modules/audio_filter/converter/float32tos16.c @@ -2,7 +2,7 @@ * float32tos16.c : converter from float32 to signed 16 bits integer ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: float32tos16.c,v 1.11 2002/10/15 23:10:54 massiot Exp $ + * $Id: float32tos16.c,v 1.12 2002/11/20 16:43:32 sam Exp $ * * Authors: Christophe Massiot * @@ -24,7 +24,6 @@ /***************************************************************************** * Preamble *****************************************************************************/ -#include #include /* malloc(), free() */ #include diff --git a/modules/audio_filter/converter/float32tos8.c b/modules/audio_filter/converter/float32tos8.c index cf635228da..06d30eef4d 100644 --- a/modules/audio_filter/converter/float32tos8.c +++ b/modules/audio_filter/converter/float32tos8.c @@ -2,7 +2,7 @@ * float32tos8.c : converter from float32 to signed 8 bits integer ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: float32tos8.c,v 1.6 2002/10/15 23:10:54 massiot Exp $ + * $Id: float32tos8.c,v 1.7 2002/11/20 16:43:32 sam Exp $ * * Authors: Xavier Maillard * @@ -24,7 +24,6 @@ /***************************************************************************** * Preamble *****************************************************************************/ -#include #include /* malloc(), free() */ #include diff --git a/modules/audio_filter/converter/float32tou16.c b/modules/audio_filter/converter/float32tou16.c index cd78a50116..5af35da75a 100644 --- a/modules/audio_filter/converter/float32tou16.c +++ b/modules/audio_filter/converter/float32tou16.c @@ -2,7 +2,7 @@ * float32tou16.c : converter from float32 to unsigned 16 bits integer ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: float32tou16.c,v 1.6 2002/10/15 23:10:54 massiot Exp $ + * $Id: float32tou16.c,v 1.7 2002/11/20 16:43:32 sam Exp $ * * Authors: Xavier Maillard * @@ -24,7 +24,6 @@ /***************************************************************************** * Preamble *****************************************************************************/ -#include #include /* malloc(), free() */ #include diff --git a/modules/audio_filter/converter/float32tou8.c b/modules/audio_filter/converter/float32tou8.c index 477ab130a3..5567818b59 100644 --- a/modules/audio_filter/converter/float32tou8.c +++ b/modules/audio_filter/converter/float32tou8.c @@ -2,7 +2,7 @@ * float32tou8.c : converter from float32 to unsigned 8 bits integer ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: float32tou8.c,v 1.6 2002/10/15 23:10:54 massiot Exp $ + * $Id: float32tou8.c,v 1.7 2002/11/20 16:43:32 sam Exp $ * * Authors: Xavier Maillard * @@ -24,7 +24,6 @@ /***************************************************************************** * Preamble *****************************************************************************/ -#include #include /* malloc(), free() */ #include diff --git a/modules/audio_filter/converter/s16tofloat32.c b/modules/audio_filter/converter/s16tofloat32.c index ef4a85f277..5b7f75f471 100644 --- a/modules/audio_filter/converter/s16tofloat32.c +++ b/modules/audio_filter/converter/s16tofloat32.c @@ -2,7 +2,7 @@ * s16tofloat32.c : converter from signed 16 bits integer to float32 ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: s16tofloat32.c,v 1.4 2002/10/15 23:10:54 massiot Exp $ + * $Id: s16tofloat32.c,v 1.5 2002/11/20 16:43:32 sam Exp $ * * Authors: Samuel Hocevar * @@ -24,7 +24,6 @@ /***************************************************************************** * Preamble *****************************************************************************/ -#include #include /* malloc(), free() */ #include diff --git a/modules/audio_filter/converter/s16tofloat32swab.c b/modules/audio_filter/converter/s16tofloat32swab.c index cebfbea2bd..615e389612 100644 --- a/modules/audio_filter/converter/s16tofloat32swab.c +++ b/modules/audio_filter/converter/s16tofloat32swab.c @@ -3,7 +3,7 @@ * with endianness change ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: s16tofloat32swab.c,v 1.7 2002/10/15 23:10:54 massiot Exp $ + * $Id: s16tofloat32swab.c,v 1.8 2002/11/20 16:43:32 sam Exp $ * * Authors: Samuel Hocevar * Henri Fallon @@ -26,7 +26,6 @@ /***************************************************************************** * Preamble *****************************************************************************/ -#include #include /* malloc(), free() */ #include diff --git a/modules/audio_filter/converter/s8tofloat32.c b/modules/audio_filter/converter/s8tofloat32.c index 9454db8c36..0ee3a6dd04 100644 --- a/modules/audio_filter/converter/s8tofloat32.c +++ b/modules/audio_filter/converter/s8tofloat32.c @@ -2,7 +2,7 @@ * s8tofloat32.c : converter from signed 8 bits integer to float32. ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: s8tofloat32.c,v 1.1 2002/11/08 14:23:49 gbazin Exp $ + * $Id: s8tofloat32.c,v 1.2 2002/11/20 16:43:32 sam Exp $ * * Authors: Gildas Bazin * @@ -24,7 +24,6 @@ /***************************************************************************** * Preamble *****************************************************************************/ -#include #include /* malloc(), free() */ #include diff --git a/modules/audio_filter/converter/u8tofloat32.c b/modules/audio_filter/converter/u8tofloat32.c index 8736a5cec0..9957a499bb 100644 --- a/modules/audio_filter/converter/u8tofloat32.c +++ b/modules/audio_filter/converter/u8tofloat32.c @@ -2,7 +2,7 @@ * u8tofloat32.c : converter from unsigned 8 bits integer to float32. ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: u8tofloat32.c,v 1.2 2002/11/18 15:19:26 gbazin Exp $ + * $Id: u8tofloat32.c,v 1.3 2002/11/20 16:43:32 sam Exp $ * * Authors: Gildas Bazin * @@ -24,7 +24,6 @@ /***************************************************************************** * Preamble *****************************************************************************/ -#include #include /* malloc(), free() */ #include diff --git a/modules/audio_filter/resampler/linear.c b/modules/audio_filter/resampler/linear.c index 5d61ca479e..cc2005f93c 100644 --- a/modules/audio_filter/resampler/linear.c +++ b/modules/audio_filter/resampler/linear.c @@ -2,7 +2,7 @@ * linear.c : linear interpolation resampler ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: linear.c,v 1.5 2002/11/15 00:41:00 gbazin Exp $ + * $Id: linear.c,v 1.6 2002/11/20 16:43:32 sam Exp $ * * Authors: Gildas Bazin * Sigmund Augdal @@ -25,7 +25,6 @@ /***************************************************************************** * Preamble *****************************************************************************/ -#include #include /* malloc(), free() */ #include diff --git a/modules/audio_filter/resampler/trivial.c b/modules/audio_filter/resampler/trivial.c index 416f4f895f..8cdf58b900 100644 --- a/modules/audio_filter/resampler/trivial.c +++ b/modules/audio_filter/resampler/trivial.c @@ -2,7 +2,7 @@ * trivial.c : trivial resampler (skips samples or pads with zeroes) ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: trivial.c,v 1.9 2002/11/14 22:38:46 massiot Exp $ + * $Id: trivial.c,v 1.10 2002/11/20 16:43:32 sam Exp $ * * Authors: Christophe Massiot * @@ -24,7 +24,6 @@ /***************************************************************************** * Preamble *****************************************************************************/ -#include #include /* malloc(), free() */ #include diff --git a/modules/audio_filter/resampler/ugly.c b/modules/audio_filter/resampler/ugly.c index 035b998749..880bb511ae 100644 --- a/modules/audio_filter/resampler/ugly.c +++ b/modules/audio_filter/resampler/ugly.c @@ -2,7 +2,7 @@ * ugly.c : ugly resampler (changes pitch) ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: ugly.c,v 1.6 2002/11/14 22:38:46 massiot Exp $ + * $Id: ugly.c,v 1.7 2002/11/20 16:43:32 sam Exp $ * * Authors: Samuel Hocevar * @@ -24,7 +24,6 @@ /***************************************************************************** * Preamble *****************************************************************************/ -#include #include /* malloc(), free() */ #include diff --git a/modules/audio_mixer/float32.c b/modules/audio_mixer/float32.c index 84b4fc2eeb..a9e7084d32 100644 --- a/modules/audio_mixer/float32.c +++ b/modules/audio_mixer/float32.c @@ -2,7 +2,7 @@ * float32.c : precise float32 audio mixer implementation ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: float32.c,v 1.7 2002/11/14 22:38:47 massiot Exp $ + * $Id: float32.c,v 1.8 2002/11/20 16:43:33 sam Exp $ * * Authors: Christophe Massiot * @@ -24,7 +24,6 @@ /***************************************************************************** * Preamble *****************************************************************************/ -#include #include /* malloc(), free() */ #include diff --git a/modules/audio_mixer/spdif.c b/modules/audio_mixer/spdif.c index de662b6e79..1ac2cad767 100644 --- a/modules/audio_mixer/spdif.c +++ b/modules/audio_mixer/spdif.c @@ -2,7 +2,7 @@ * spdif.c : dummy mixer for S/PDIF output (1 input only) ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: spdif.c,v 1.7 2002/09/28 13:05:16 massiot Exp $ + * $Id: spdif.c,v 1.8 2002/11/20 16:43:33 sam Exp $ * * Authors: Christophe Massiot * @@ -24,7 +24,6 @@ /***************************************************************************** * Preamble *****************************************************************************/ -#include #include /* malloc(), free() */ #include diff --git a/modules/audio_mixer/trivial.c b/modules/audio_mixer/trivial.c index 809620cd68..8a160768af 100644 --- a/modules/audio_mixer/trivial.c +++ b/modules/audio_mixer/trivial.c @@ -2,7 +2,7 @@ * trivial.c : trivial mixer plug-in (1 input, no downmixing) ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: trivial.c,v 1.10 2002/10/15 23:10:54 massiot Exp $ + * $Id: trivial.c,v 1.11 2002/11/20 16:43:33 sam Exp $ * * Authors: Christophe Massiot * @@ -24,7 +24,6 @@ /***************************************************************************** * Preamble *****************************************************************************/ -#include #include /* malloc(), free() */ #include diff --git a/modules/audio_output/waveout.c b/modules/audio_output/waveout.c index 34cd18c522..797f7e9658 100644 --- a/modules/audio_output/waveout.c +++ b/modules/audio_output/waveout.c @@ -2,7 +2,7 @@ * waveout.c : Windows waveOut plugin for vlc ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: waveout.c,v 1.11 2002/11/15 16:27:10 gbazin Exp $ + * $Id: waveout.c,v 1.12 2002/11/20 16:43:33 sam Exp $ * * Authors: Gildas Bazin * @@ -24,10 +24,7 @@ /***************************************************************************** * Preamble *****************************************************************************/ -#include /* ENOMEM */ -#include /* open(), O_WRONLY */ #include /* strerror() */ - #include /* calloc(), malloc(), free() */ #include @@ -152,13 +149,22 @@ static int Open( vlc_object_t *p_this ) p_aout->output.p_sys->i_buffer_size = FRAME_SIZE * p_aout->output.output.i_bytes_per_frame; /* Allocate silence buffer */ +#ifndef UNDER_CE p_aout->output.p_sys->p_silence_buffer = calloc( p_aout->output.p_sys->i_buffer_size, 1 ); +#else + p_aout->output.p_sys->p_silence_buffer = + malloc( p_aout->output.p_sys->i_buffer_size ); +#endif if( p_aout->output.p_sys->p_silence_buffer == NULL ) { msg_Err( p_aout, "out of memory" ); return 1; } +#ifdef UNDER_CE + memset( p_aout->output.p_sys->p_silence_buffer, 0, + p_aout->output.p_sys->i_buffer_size ); +#endif /* We need to kick off the playback in order to have the callback properly * working */ @@ -243,7 +249,11 @@ static int OpenWaveOut( aout_instance_t *p_aout, int i_format, /* Open the device */ result = waveOutOpen( &p_aout->output.p_sys->h_waveout, WAVE_MAPPER, &p_aout->output.p_sys->waveformat, +#ifndef UNDER_CE (DWORD_PTR)WaveOutCallback, (DWORD_PTR)p_aout, +#else + (DWORD)WaveOutCallback, (DWORD)p_aout, +#endif CALLBACK_FUNCTION ); if( result == WAVERR_BADFORMAT ) { @@ -274,7 +284,11 @@ static int PlayWaveOut( aout_instance_t *p_aout, HWAVEOUT h_waveout, /* Use silence buffer instead */ p_waveheader->lpData = p_aout->output.p_sys->p_silence_buffer; +#ifndef UNDER_CE p_waveheader->dwUser = (DWORD_PTR)p_buffer; +#else + p_waveheader->dwUser = (DWORD)p_buffer; +#endif p_waveheader->dwBufferLength = p_aout->output.p_sys->i_buffer_size; p_waveheader->dwFlags = 0; diff --git a/share/resource.h b/share/resource.h index fcae52ab57..8f40863d64 100644 --- a/share/resource.h +++ b/share/resource.h @@ -11,13 +11,20 @@ #define IDM_FILE_EXIT 40002 #define IDM_HELP_ABOUT 40003 #define IDM_PLOP 40004 +#define ID_VIEW_PLAYLIST 40005 +#define ID_VIEW_MESSAGES 40006 +#define ID_SETTINGS_AUDIO 40007 +#define ID_SETTINGS_SUBTITLES 40008 +#define ID_SETTINGS 40011 +#define ID_FILE_OPENFILE 40012 +#define ID_FILE_NETWORKSTREAM 40013 // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 104 -#define _APS_NEXT_COMMAND_VALUE 40005 +#define _APS_NEXT_COMMAND_VALUE 40014 #define _APS_NEXT_CONTROL_VALUE 1001 #define _APS_NEXT_SYMED_VALUE 101 #endif diff --git a/share/vlc_wince_rc.rc b/share/vlc_wince_rc.rc index 442e859d4c..9a8fda9cc8 100644 --- a/share/vlc_wince_rc.rc +++ b/share/vlc_wince_rc.rc @@ -58,20 +58,35 @@ END ///////////////////////////////////////////////////////////////////////////// // -// Menubar +// Menu // IDM_MENU MENU DISCARDABLE BEGIN POPUP "&File" BEGIN + MENUITEM "Open File...", ID_FILE_OPENFILE, GRAYED + MENUITEM "Network Stream...", ID_FILE_NETWORKSTREAM + , GRAYED + MENUITEM SEPARATOR MENUITEM "E&xit", IDM_FILE_EXIT END - MENUITEM "View", 65535 - MENUITEM "Settings", 65535 + POPUP "View" + BEGIN + MENUITEM "Playlist...", ID_VIEW_PLAYLIST, GRAYED + MENUITEM "Messages...", ID_VIEW_MESSAGES, GRAYED + END + POPUP "Settings" + BEGIN + MENUITEM "Audio", ID_SETTINGS_AUDIO, GRAYED + MENUITEM "Subtitles", ID_SETTINGS_SUBTITLES + , GRAYED + MENUITEM SEPARATOR + MENUITEM "Preferences...", ID_SETTINGS, GRAYED + END POPUP "&Help" BEGIN - MENUITEM "&About", IDM_HELP_ABOUT + MENUITEM "&About...", IDM_HELP_ABOUT END END @@ -81,7 +96,7 @@ END // Dialog // -IDD_ABOUTBOX DIALOGEX 0, 0, 127, 42 +IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 127, 42 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE 0x80000000L CAPTION "About PocketVLC" -- 2.39.2