Max Kellermann
097e200a97
mixer/{oss,alsa}: renamed the mixer source files
2009-10-20 21:23:05 +02:00
Max Kellermann
66a2c5669e
output_plugin: replaced output_plugin.get_mixer() with mixer_plugin
...
The mixer core library is now responsible for creating and managing
the mixer object. This removes duplicated code from the output
plugins.
2009-03-26 18:23:23 +01:00
Max Kellermann
b488355df8
mixer_api: moved mixer_plugin imports to mixer_list.h
...
This patch allows the output plugins to import only mixer_list.h,
instead of the full mixer_api.h (which would expose internal
structures).
2009-03-14 11:36:59 +01:00
Max Kellermann
a5017a2d7c
mixer_api: moved functions to mixer_control.c
...
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).
2009-03-14 11:36:50 +01:00
Avuton Olrich
0aee49bdf8
all: Update copyright header.
...
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.
2009-03-13 11:51:55 -07:00
Max Kellermann
614fe8b341
output: removed duplicate debug messages from plugins
...
The MPD core logs the audio format of all audio outputs. Remove the
duplicate message from the plugins.
2009-03-01 10:39:42 +01:00
Max Kellermann
ec926539a3
output_plugin: report errors with GError
...
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.
2009-02-26 22:04:59 +01:00
Max Kellermann
4f2ac7ec2c
oss: moved code from oss_open() to oss_setup()
...
Eliminate one label and a bunch of gotos.
2009-02-26 19:18:16 +01:00
Max Kellermann
749d6c7766
oss: convert OSS_STAT_* to an enum
...
Use C instead of CPP.
2009-02-26 19:18:13 +01:00
Max Kellermann
a0b3f35537
oss: return bool instead of int
...
Return type of oss_find_supported_param(), oss_can_convert() and
oss_find_unsupported_param() should be bool instead of int.
2009-02-26 19:17:56 +01:00
Max Kellermann
e1f58fdcf5
oss: use unsigned integers
...
Convert the num_supported and num_unsupported variables from signed to
unsigned.
2009-02-26 19:17:09 +01:00
Max Kellermann
4958a6f56f
oss: no CamelCase
...
Renamed types, functions and variables.
2009-02-26 19:16:33 +01:00
Max Kellermann
dcd84c19cd
output_plugin: don't pass audio_output object to method init()
...
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.
2009-02-25 18:34:02 +01:00
Max Kellermann
a4dfab2aee
output: pass the music chunk pointer as void*, not char*
...
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.
2009-02-23 09:34:26 +01:00
Max Kellermann
5a898c15e7
output_api: play() returns a length
...
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.
2009-02-23 09:29:56 +01:00
Max Kellermann
37bc31d161
output_plugin: replaced method "control()" with "mixer()"
...
The output plugin shouldn't know any specifics of the mixer API. Make
it return the mixer object, and let the caller deal with it.
2009-02-16 01:39:00 +01:00
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
8695b94232
mixer: removed mixer_configure(), configure mixer in mixer_new()
...
Allocate the mixer object when it is configured.
Merged mixer_configure() into mixer_new(). mixer_new() was quite
useless anyway.
2009-01-25 17:37:59 +01:00
Max Kellermann
763dd8c1dd
mixer: return a mixer struct pointer
...
Don't use statically allocated mixer objects.
2009-01-25 17:37:55 +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
a531a1e650
conf: added config_get_block_string()
...
This replaces lots of getBlockParam() invocations.
2009-01-18 19:37:27 +01:00
Max Kellermann
4d472c265e
conf: no CamelCase, part I
...
Renamed functions, types, variables.
2009-01-17 20:23:27 +01:00
Max Kellermann
106bfaa726
oss: evaluate the oss_open() return value properly
...
It returns bool, not int.
2009-01-16 17:11:18 +01:00
Viliam Mateicka
11c29cccb3
Introducing mixer api
...
This patch tryes to introduce pluggable mixer (struct mixer_plugin) along with some basic infrastructure (mixer_* functions). Instance of mixer (struct mixer) is used in
alsa and oss output plugin
2009-01-10 17:55:38 +01:00
Max Kellermann
d9c2960a55
fix G_BYTE_ORDER check
...
"#ifdef G_BYTE_ORDER == G_BIG_ENDIAN" cannot work, of course.
2009-01-05 12:40:57 +01:00
Max Kellermann
ac0fe98ffb
use GLib byte order macros
2009-01-05 08:17:22 +01:00
Viliam Mateicka
1a04e57168
renaming mixer.h to mixer_api.h
2009-01-04 19:15:18 +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
Viliam Mateicka
9a70c4d06d
Moving mixers to audio outputs
2008-12-31 16:46:41 +01:00
Max Kellermann
0277921e6a
oss: use GLib instead of utils.h/log.h
2008-11-25 17:43:28 +01:00
Max Kellermann
2f76db4c78
output: close device on play error
...
When an output plugin fails to play a chunk, close it. This replaces
various manual close() calls in nearly all plugins.
2008-10-29 20:40:33 +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
5c4dc8d03c
oss: check and override audio_format properly
...
Don't accept 24 bit audio. Force MPD to use 16 bit if anything other
than 8 or 16 bit is selected.
2008-10-29 18:35:03 +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