aboutsummaryrefslogtreecommitdiffstats
path: root/src/output/pulse_plugin.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* pulse: make configuration strings constMax Kellermann2009-03-261-6/+4
| | | | | | Nobody needs to modify these strings. We can make them const, and convert config_dup_block_string() to config_get_block_string(). This also fixes memory leaks in the pulse mixer.
* pulse: don't check config_param!=NULLMax Kellermann2009-03-261-4/+2
| | | | | The conf.h functions deal well with config_param==NULL and will return the specified default value then.
* output_plugin: replaced output_plugin.get_mixer() with mixer_pluginMax Kellermann2009-03-261-16/+1
| | | | | | The mixer core library is now responsible for creating and managing the mixer object. This removes duplicated code from the output plugins.
* mixer_api: moved mixer_plugin imports to mixer_list.hMax Kellermann2009-03-141-1/+1
| | | | | | This patch allows the output plugins to import only mixer_list.h, instead of the full mixer_api.h (which would expose internal structures).
* mixer_api: moved functions to mixer_control.cMax Kellermann2009-03-141-0/+1
| | | | | | mixer_control.h should provide the functions needed to manipulate a mixer, without exposing the internal mixer API (which is provided by mixer_api.h).
* all: Update copyright header.Avuton Olrich2009-03-131-6/+7
| | | | | | | | This updates the copyright header to all be the same, which is pretty much an update of where to mail request for a copy of the GPL and the years of the MPD project. This also puts all committers under 'The Music Player Project' umbrella. These entries should go individually in the AUTHORS file, for consistancy.
* pulse mixerDavid Guibert2009-03-071-0/+16
| | | | | | | | | | | | | | | | | | | | This patch introduces the mixer for the pulse output. Technically speaking, the pulse index is needed to get or set the volume. You must define callback fonctions to get this index since the pulse output in mpd is done using the simpe api. The pulse simple api does not provide the index of the newly defined output. So callback fonctions are associated to the pulse context. The list of all the sink input is then retreived. Then we select the name of the mpd pulse output and control its volume by its associated index number. Signed-off-by: Patrice Linel <patnathanael@gmail.com> Signed-off-by: David Guibert <david.guibert@gmail.com> [mk: fixed whitespace errors and broke long lines; removed daemonization changes from main.c]
* output: removed duplicate debug messages from pluginsMax Kellermann2009-03-011-6/+0
| | | | | The MPD core logs the audio format of all audio outputs. Remove the duplicate message from the plugins.
* output_plugin: report errors with GErrorMax Kellermann2009-02-261-9/+17
| | | | | | | Use GLib's GError library for reporting output device failures. Note that some init() methods don't clean up properly after a failure, but that's ok for now, because the MPD core will abort anyway.
* pulse: removed pa_simple!=NULL checksMax Kellermann2009-02-261-10/+2
| | | | | | | The MPD core guarantees that the audio_output object is always consistent, and our pa_simple!=NULL checks are superfluous. Also don't manually close the device on error in pulse_play(), since the MPD core does this automatically when the play() method returns 0.
* output_plugin: don't pass audio_output object to method init()Max Kellermann2009-02-251-2/+1
| | | | | | audio_output_get_name() has been removed, which was the only function left in output_api.h. The output plugin doesn't need the audio_output object at all, remove the parameter from the init() method.
* output_api: removed audio_output_get_name()Max Kellermann2009-02-251-11/+8
| | | | Use config_get_block_string("name") instead of audio_output_get_name().
* output: pass the music chunk pointer as void*, not char*Max Kellermann2009-02-231-2/+2
| | | | | | The meaning of the chunk depends on the audio format; don't suggest a specific format by declaring the pointer as "char*", pass "void*" instead.
* output_api: play() returns a lengthMax Kellermann2009-02-231-3/+3
| | | | | | | | The old API required an output plugin to not return until all data passed to the play() method is consumed. Some output plugins have to loop to fulfill that requirement, and may block during that. Simplify these, by letting them consume only part of the buffer: make play() return the length of the consumed data.
* conf: const pointers in block get functionsMax Kellermann2009-01-251-1/+1
| | | | | All config_get_block_*() functions should accept constant config_param pointers.
* conf: added config_get_block_string()Max Kellermann2009-01-181-9/+4
| | | | This replaces lots of getBlockParam() invocations.
* conf: no CamelCase, part IMax Kellermann2009-01-171-3/+3
| | | | Renamed functions, types, variables.
* output plugins: don't include gcc.hMax Kellermann2009-01-011-1/+1
| | | | Use GLib's G_GNUC_UNUSED instead of gcc.h's mpd_unused.
* pulse: removed reconnect intervalMax Kellermann2008-11-051-19/+2
| | | | | The output thread automatically waits some time before retrying to open the device. Don't duplicate this check in the pulse plugin.
* pulse: check if connection is open in pulse_cancel()Max Kellermann2008-11-051-0/+3
| | | | | The pulse plugin crashed with a segmentation fault when the pulse server was killed.
* pulse: fix segfault without sink nameMax Kellermann2008-10-301-2/+2
| | | | | Commit d692e9 broke configurations without explicit server or sink configuration. Check for getBlockParam()==NULL.
* output: use bool for return values and flagsMax Kellermann2008-10-291-11/+11
| | | | | Don't return 0/-1 on success/error, but true/false. Instead of int, use bool for storing flags.
* pulse: clear pa_simple pointer in pulse_close()Max Kellermann2008-10-291-0/+1
| | | | | The pointer becomes invalid due to pa_simple_free(), which may lead to segmentation faults when the output is reopened later.
* pulse: use GLib instead of util.h/log.hMax Kellermann2008-10-291-28/+25
| | | | Use GLib allocation and logging functions.
* pulse: no CamelCaseMax Kellermann2008-10-291-48/+49
|
* output: don't compile plugins which are disabledMax Kellermann2008-10-261-8/+0
| | | | Don't compile the sources of disabled output plugins at all.
* renamed src/audioOutputs/ to src/output/Max Kellermann2008-10-261-0/+218
Again, no CamelCase in the directory name.