aboutsummaryrefslogtreecommitdiffstats
path: root/src/output/mvp_plugin.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* include config.h in all sourcesMax Kellermann2009-11-121-0/+1
| | | | | | After we've been hit by Large File Support problems several times in the past week (which only occur on 32 bit platforms, which I don't have), this is yet another attempt to fix the issue.
* fd_util: removed creat_cloexec()Max Kellermann2009-11-101-2/+2
| | | | Add a "mode" argument to open_cloexec() instead.
* set the close-on-exec flag on all file descriptorsMax Kellermann2009-11-071-3/+5
| | | | | | | | | | | Added the "fd_util" library, which attempts to use the new thread-safe Linux system calls pipe2(), accept4() and the options O_CLOEXEC, SOCK_CLOEXEC. Without these, it falls back to FD_CLOEXEC, which is not thread safe. This is particularly important for the "pipe" output plugin (and others, such as JACK/PulseAudio), because we were heavily leaking file descriptors to child processes.
* all: Update copyright header.Avuton Olrich2009-03-131-9/+12
| | | | | | | | 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.
* mvp: fixed default device detectionMax Kellermann2009-02-261-1/+1
| | | | | The check "open()!=0" is wrong, you have to write "open()>=0", because -1 means error, and 0 is a valid file handle.
* output_plugin: report errors with GErrorMax Kellermann2009-02-261-23/+44
| | | | | | | 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.
* mvp: check for reopen errorsMax Kellermann2009-02-251-2/+7
| | | | | When the MVP device has been closed in the cancel() method, and the play() method attempts to reopen it, check for errors.
* mvp: moved code to mvp_find_sample_rate()Max Kellermann2009-02-251-9/+17
| | | | Moved the table lookup code to a separate function.
* mvp: make the mvp_sample_rates array constMax Kellermann2009-02-251-1/+1
| | | | The array must never be modified, it's a constant lookup table.
* mvp: fall back to 16 bit audio samplesMax Kellermann2009-02-251-1/+5
| | | | | | Looks like the MVP audio output only supports 16 and 24 bit audio samples. If MPD generates any other sample formats, force it to use 16 bit.
* mvp: fall back to stereoMax Kellermann2009-02-251-1/+5
| | | | When the channel count is greater than 2, fall back to stereo sound.
* mvp: mvp_set_pcm_params() returns boolMax Kellermann2009-02-251-9/+14
| | | | | Return true/false instead of 0/-1. Also check its return value in mvp_output_open().
* mvp: pass audio_format struct to mvp_set_pcm_params()Max Kellermann2009-02-251-13/+23
| | | | | Pass a pointer to the audio_format struct instead of 3 separate integers.
* mvp: removed big_endian parameter from mvp_set_pcm_params()Max Kellermann2009-02-251-16/+3
| | | | | Don't pass the big_endian flag to mvp_set_pcm_params(), do a simple "G_BYTE_ORDER==G_LITTLE_ENDIAN" instead.
* mvp: use G_N_ELEMENTS(mvp_sample_rates)Max Kellermann2009-02-251-5/+2
| | | | | Instead of manually calculating the number of elements in the mvp_sample_rates array, use GLib's convenience macro G_N_ELEMENTS().
* mvp: no CamelCaseMax Kellermann2009-02-251-34/+38
| | | | Renamed types, functions and variables.
* output_plugin: don't pass audio_output object to method init()Max Kellermann2009-02-251-5/+3
| | | | | | 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: 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-6/+6
| | | | | | | | 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.
* output_api: removed audio_output_closed()Max Kellermann2009-01-301-1/+0
| | | | | The function is only used by the MVP output plugin, and this one call is wrong.
* use g_free() instead of free()Max Kellermann2009-01-251-1/+1
| | | | | | 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.
* conf: const pointers in block get functionsMax Kellermann2009-01-251-1/+1
| | | | | All config_get_block_*() functions should accept constant config_param pointers.
* conf: no CamelCase, part IMax Kellermann2009-01-171-1/+1
| | | | Renamed functions, types, variables.
* fix G_BYTE_ORDER checkMax Kellermann2009-01-051-1/+1
| | | | "#ifdef G_BYTE_ORDER == G_BIG_ENDIAN" cannot work, of course.
* use GLib byte order macrosMax Kellermann2009-01-051-6/+7
|
* output plugins: don't include gcc.hMax Kellermann2009-01-011-3/+4
| | | | Use GLib's G_GNUC_UNUSED instead of gcc.h's mpd_unused.
* mvp: use GLib instead of utils.h/log.hMax Kellermann2008-11-251-16/+27
|
* output: close device on play errorMax Kellermann2008-10-291-1/+0
| | | | | When an output plugin fails to play a chunk, close it. This replaces various manual close() calls in nearly all plugins.
* output: use bool for return values and flagsMax Kellermann2008-10-291-13/+15
| | | | | Don't return 0/-1 on success/error, but true/false. Instead of int, use bool for storing flags.
* 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/+280
Again, no CamelCase in the directory name.