[vlc-devel] Symbian Aout
Jean-Baptiste Kempf
jb at videolan.org
Sat Feb 12 21:30:10 CET 2011
On Sun, Feb 13, 2011 at 01:48:00AM +0530, Pankaj yadav wrote :
> #define bool int
What for?
> #include <mda\common\audio.h>
> #include <Mda\Client\Utility.h>
> #include <MdaAudioOutputStream.h>
> #if !defined(__MDA_COMMON_RESOURCE_H__)
> #include <Mda\Common\Resource.h>
> #endif
Weird inclusions
> #define FRAME_SIZE 12442
> #define BUFFERSIZE 12442
Why this number?
> vlc_module_begin();
> set_description( _("Symbian audio output") );
> set_capability( "audio output", 40 );
> add_shortcut( "sdl" );
> set_callbacks( Open, Close );
missing a lot of things, see other modules... And sdl...
> if((desired.freq < 8000) || (desired.freq > 96000))
> {
> return VLC_EGENERIC;
> }
> if((desired.freq >= 8000) && (desired.freq < 11025))
> {
> SymbianSound.v_freq = 0x10;
> }
> if((desired.freq >= 11025) && (desired.freq < 12000))
> {
> SymbianSound.v_freq = 0x40;
> }
> if((desired.freq >= 12000) && (desired.freq < 16000))
> {
> SymbianSound.v_freq = 0x80;
> }
> if((desired.freq >= 16000) && (desired.freq < 22050))
> {
> SymbianSound.v_freq = 0x100;
> }
> if((desired.freq >= 22050) && (desired.freq < 24000))
> {
> SymbianSound.v_freq = 0x400;
> }
> if((desired.freq >= 24000) && (desired.freq < 32000))
> {
> SymbianSound.v_freq = 0x800;
> }
> if((desired.freq >= 32000) && (desired.freq < 44100))
> {
> SymbianSound.v_freq = 0x1000;
> }
> if((desired.freq >= 44100) && (desired.freq < 48000))
> {
> SymbianSound.v_freq = 0x4000;
> }
> if((desired.freq >= 48000) && (desired.freq<64000))
> {
> SymbianSound.v_freq = 0x10000;
> }
> if((desired.freq >= 64000) && (desired.freq<96000))
> {
> SymbianSound.v_freq = 0x40000;
> }
> if(desired.freq == 96000)
> {
> SymbianSound.v_freq=0x20000;
> }
You know, you can use else...
> if ( var_Type( p_aout, "audio-device" ) == 0 )
> {
> var_Create( p_aout, "audio-device",
> VLC_VAR_INTEGER | VLC_VAR_HASCHOICE );
> text.psz_string = _("Audio device");
> var_Change( p_aout, "audio-device", VLC_VAR_SETTEXT, &text, NULL );
I doubt this is how we do now.
> static void Play( aout_instance_t * p_aout )
> {
> /*Yes It should be Empty*/
Very weird.
> void *createdevice(void * arg)
> {
> if (!CActiveScheduler::Current())
> {
> SymbianSound.scheduler = new (ELeave) CActiveScheduler;
> if(SymbianSound.scheduler)
> {
> CActiveScheduler::Install(SymbianSound.scheduler);
indentation is wrong.
Comments are missing. This needs some polish, I would say.
Best Regards,
--
Jean-Baptiste Kempf
http://www.jbkempf.com/
+33 672 704 734
More information about the vlc-devel
mailing list