From: Lennart Poettering
You may browse the Doxygen generated programing -documentation for the client API. (Run make doxygen to generate this documentation from the source tree)
-Simply start the polypaudio daemon with the argument -C
@@ -114,13 +110,36 @@ documentation for the client API. (Run make doxygen to generate thiNow you can issue CLI commands as described in cli.html. Another way to start -polypaudio is by specifying a configuration script on the -command line like that one included in the distribution:
+polypaudio is by specifying a configuration script like that one included in the distribution on the +command line :polypaudio -F polypaudio.pa
This will load some drivers and protocols automatically.
+You may browse the Doxygen generated programing +documentation for the client API. (Run make doxygen to generate this documentation from the source tree)
+ +There are several reasons for writing loadable modules for polypaudio:
+ +There is currently no documentation how to write loadable modules +for polypaudio. Read the source, Luke! If you are interested in +writing new modules feel free to contact the author in case you have any +questions.
+Currently, polypaudio is tested on Linux only. It requires an OSS or ALSA compatible soundcard.
diff --git a/doc/cli.html.in b/doc/cli.html.in index c67d78db7..01c04cc9a 100644 --- a/doc/cli.html.in +++ b/doc/cli.html.in @@ -87,7 +87,45 @@ input list. The same volume rules apply as with sink_volume. (resp. ssource) by its index in the sink (resp. source) list or by its name. -Lists the contents of the sample cache.
+ +Play a sample cache entry to a sink. Expects the sample name and the sink name as arguments.
+ +Remove an entry from the sample cache. Expects the sample name as argument.
+ +Load an audio file to the sample cache. Expects the file name to load and the desired sample name as arguments.
+ +Lists all currently defined autoloading entries.
+ +Adds an autoloading entry for a sink (resp. source). Expects the sink name (resp. source name), the module name and the module arguments as arguments.
+ +Remove an autoloading entry. Expects the sink name (resp. source name) as argument.
+ +Play an audio file to a sink. Expects the file name and the sink name as argumens.
+ +Mark the following script as executable (chmod +x) and run it for a sensible polypaudio configuration.
+#!/usr/bin/polaudio -F -# Load audio drivers -load module-alsa-sink device=plughw:0,0 rate=48000 -load module-alsa-source device=hw:1,0 +# Create autoload entries for the device drivers +autoload_sink_add output module-alsa-sink device=plughw:0,0 rate=48000 sink_name=output +autoload_source_add input load module-alsa-source device=hw:1,0 source_name=input # Load several protocols load module-esound-protocol-tcp @@ -136,17 +176,22 @@ load module-cli-protocol-unix # Load the CLI module (This is similar to passing "-C" on the command line of polypaudio) load module-cli +# Make some devices default +sink_default output +source_default input + +# Don't fail if the audio files referred to below don't exist .nofail -# Make some devices default -sink_default alsa_output -source_default alsa_input +# Load an audio to the sample cache for usage with module-x11-bell +scache_load /usr/share/sounds/KDE_Notify.wav x11-bell +load module-x11-bell -# Use digital amplification -sink_volume alsa_output 0x200 +# Play a welcome sound +play_file /usr/share/sounds/startup3.wav output