Commit Graph

16 Commits

Author SHA1 Message Date
Max Kellermann
a45922cd66 use g_free() instead of free()
On some platforms, g_free() must be used for memory allocated by
GLib.  This patch intends to correct a lot of occurrences, but is
probably not complete.
2009-01-25 18:47:21 +01:00
Max Kellermann
3635c93acb conf: allow param==NULL
Return the default value in the conf_get_block_*() functions when
param==NULL was passed.

This simplifies a lot of code, because all initialization can be done
in one code path, regardless whether configuration is present.
2009-01-25 16:04:03 +01:00
Max Kellermann
5f77910097 conf: const pointers in block get functions
All config_get_block_*() functions should accept constant config_param
pointers.
2009-01-25 16:03:49 +01:00
Max Kellermann
65f2386b39 conf: added config_get_block_unsigned()
Eliminate some more getBlockParam() invocations.
2009-01-18 19:45:51 +01:00
Max Kellermann
a531a1e650 conf: added config_get_block_string()
This replaces lots of getBlockParam() invocations.
2009-01-18 19:37:27 +01:00
Max Kellermann
73e466cfef jack: parse "ports" setting with g_strsplit()
Don't modify the configured string.
2009-01-18 19:24:14 +01:00
Max Kellermann
86f6233f46 jack: use audio_output_get_name()
Determine the audio output name with audio_output_get_name() instead
of obtaining the name from the configuration again.
2009-01-18 19:17:52 +01:00
Max Kellermann
4d472c265e conf: no CamelCase, part I
Renamed functions, types, variables.
2009-01-17 20:23:27 +01:00
Max Kellermann
051e906d85 jack: use GLib instead of utils.h 2009-01-02 17:23:10 +01:00
Max Kellermann
1fe129330e jack: duplicate jack_get_ports() return values
JACK documentation states: "The caller is responsible for calling
free(3) any non-NULL returned value."

This does not seem to include the array elements.  Duplicate them
after jack_get_ports(), and free only the array.  Convert
JackData.output_ports to non-const.
2009-01-02 17:23:00 +01:00
Max Kellermann
7dfe301b54 output plugins: don't include gcc.h
Use GLib's G_GNUC_UNUSED instead of gcc.h's mpd_unused.
2009-01-01 18:08:29 +01:00
Max Kellermann
74d4ec7fbb jack: use GLib logging 2008-12-29 17:29:36 +01:00
Max Kellermann
aa33422de6 alsa, jack: no const pointers for allocated strings
Make the pointers "device" and "name" non-const, so we don't need the
xfree() hack.  The default value is expressed as NULL.
2008-11-01 14:04:14 +01:00
Max Kellermann
58c5bee9f0 output: use bool for return values and flags
Don't return 0/-1 on success/error, but true/false.  Instead of int,
use bool for storing flags.
2008-10-29 20:40:27 +01:00
Max Kellermann
0800c6f4ca output: don't compile plugins which are disabled
Don't compile the sources of disabled output plugins at all.
2008-10-26 21:58:37 +01:00
Max Kellermann
ece8c1347c renamed src/audioOutputs/ to src/output/
Again, no CamelCase in the directory name.
2008-10-26 11:29:44 +01:00