[vlc-devel] Re: asio audio_output module : please help

Gildas Bazin gbazin at altern.org
Thu Sep 30 22:45:09 CEST 2004


On Thursday 30 September 2004 20:18, frederic.ruget at free.fr wrote:
> Hello,
> 
> I'm a newbye to this list, I hope I'm not posting off topic.
> 
> I want to code a VLC audio_output plugin to drive an
> asio sound card.
> 
> I plan to use the portaudio/asio API to write the plugin.
> 
> My OS is WinXP/cygwin.  So far I have
>   - built VLC from source (works OK)
>   - built Steinberg's ASIO SDK and portaudio package
>     from source (works OK too)
> 
> Now the questions :-)
> 
> 
> 1. Re-compilation time
> 
>   Suppose I have modified (say) alsa.c ; what is the quickest way
>   to recompile it (alsa.o) and then rebuild vlc.exe ?
> 
>   More generally, are there any tips to speed up VLC build?  For
>   example, if I change a flag in configure.ac, can I do without
>   going through the whole bootstrap && configure && make
>   procedure ?  [ takes ages on my machine :-( ]
> 

The trick is not to modify configure.ac if you don't need to.
Instead you can just edit the vlc-config script (generated by configure) and 
redo a make.
To make only a plugin, do a "(cd modules/audio_output/; make 
libalsa_plugin.dll)".
"(cd modules/audio_output/; make)" should even be enough if your plugin is 
in the plugins list of vlc-config.

> 
> 2. Adding an audio_output module
> 
>   Currently I have
>     - created an asio.c file in modules/audio_output/
> 
>     - updated modules/audio_output/Modules.am : added
> <<
> SOURCES_asio = asio.c
> >>
> 
>     - updated configure.ac : added
> <<
> dnl
> dnl  ASIO module
> dnl
> AC_ARG_ENABLE(asio,
>   [  --enable-asio           ASIO sound support (default disabled)],
>   [if test "${enable_asio}" = "yes"
>    then
>      VLC_ADD_PLUGINS([asio])
>      VLC_ADD_LDFLAGS([asio],[-llibportaudio])
>    fi])
> >>
> 
>     - bootstrap && configure [...] --enable-asio && make
> 
>   Unfortunately, my asio code does not seem to be linked
>   within vlc.exe.
> 
>   What did I do wrong ?
> 

Looks good to me.
Check if the plugin is available with "./vlc -l", also check if you have
a modules/audio_output/libasio_plugin.dll file.

>
>   By the way, is there some documentation pertaining to the
>   vlc configuration stuff (*.ac files) ?
> 

The only doc for this is the HACKING file.

> 
> 3. Best skeleton for asio.c
> 
>   The portaudio API is faily simple (requires a copy of buffers)
>   but has a callback function though.  It is described at
>   http://www.portaudio.com/docs/pa_tutorial.html.
> 
>   Amongst the several audio_output plugins already available
>   (alsa.c, coreaudio.c, ...) what would be the best template
>   for coding asio.c ?
> 

Have a look at the sdl audio output or the waveout one, they use callback 
mechanisms as well.

> VLC is great !
> Hope I'll soon be able to play DVDs in 4 speaker mode
> with my EMU 1820M card ;-)
> 

:)

--
Gildas

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html



More information about the vlc-devel mailing list