aboutsummaryrefslogtreecommitdiffstats
path: root/src/output/mvp_output_plugin.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2012-03-06use g_strerror() instead of strerror()Max Kellermann1-7/+7
Make sure we get a UTF-8 encoded string.
2011-09-19output_plugin: the plugin allocates the audio_output objectMax Kellermann1-16/+25
Pass audio_output objects around instead of void pointers. This will give some more control to the plugin, and prepares for non-blocking audio outputs.
2011-09-17output: per-plugin headerMax Kellermann1-0/+1
Move the "extern" declarations from output_list.c, for more type safety.
2011-09-17output: rename plugin source filesMax Kellermann1-0/+0
2011-02-09general: whitespace cleanupThomas Jansen1-1/+1
Remove trailing whitespace found by this command: find -name '*.[ch]' | xargs grep "[[:space:]]$"
2011-01-29copyright year 2011Max Kellermann1-1/+1
2009-12-31Update copyright notices.Avuton Olrich1-1/+1
2009-12-02audio_format: changed "bits" to "enum sample_format"Max Kellermann1-6/+6
This patch prepares support for floating point samples (and probably other formats). It changes the meaning of the "bits" attribute from a bit count to a symbolic value.
2009-11-12include config.h in all sourcesMax Kellermann1-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.
2009-11-10fd_util: removed creat_cloexec()Max Kellermann1-2/+2
Add a "mode" argument to open_cloexec() instead.
2009-11-07set the close-on-exec flag on all file descriptorsMax Kellermann1-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.
2009-03-13all: Update copyright header.Avuton Olrich1-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.
2009-02-26mvp: fixed default device detectionMax Kellermann1-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.
2009-02-26output_plugin: report errors with GErrorMax Kellermann1-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.
2009-02-25mvp: check for reopen errorsMax Kellermann1-2/+7
When the MVP device has been closed in the cancel() method, and the play() method attempts to reopen it, check for errors.
2009-02-25mvp: moved code to mvp_find_sample_rate()Max Kellermann1-9/+17
Moved the table lookup code to a separate function.
2009-02-25mvp: make the mvp_sample_rates array constMax Kellermann1-1/+1
The array must never be modified, it's a constant lookup table.
2009-02-25mvp: fall back to 16 bit audio samplesMax Kellermann1-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.
2009-02-25mvp: fall back to stereoMax Kellermann1-1/+5
When the channel count is greater than 2, fall back to stereo sound.
2009-02-25mvp: mvp_set_pcm_params() returns boolMax Kellermann1-9/+14
Return true/false instead of 0/-1. Also check its return value in mvp_output_open().
2009-02-25mvp: pass audio_format struct to mvp_set_pcm_params()Max Kellermann1-13/+23
Pass a pointer to the audio_format struct instead of 3 separate integers.
2009-02-25mvp: removed big_endian parameter from mvp_set_pcm_params()Max Kellermann1-16/+3
Don't pass the big_endian flag to mvp_set_pcm_params(), do a simple "G_BYTE_ORDER==G_LITTLE_ENDIAN" instead.
2009-02-25mvp: use G_N_ELEMENTS(mvp_sample_rates)Max Kellermann1-5/+2
Instead of manually calculating the number of elements in the mvp_sample_rates array, use GLib's convenience macro G_N_ELEMENTS().
2009-02-25mvp: no CamelCaseMax Kellermann1-34/+38
Renamed types, functions and variables.
2009-02-25output_plugin: don't pass audio_output object to method init()Max Kellermann1-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.
2009-02-23output: pass the music chunk pointer as void*, not char*Max Kellermann1-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.
2009-02-23output_api: play() returns a lengthMax Kellermann1-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.
2009-01-30output_api: removed audio_output_closed()Max Kellermann1-1/+0
The function is only used by the MVP output plugin, and this one call is wrong.
2009-01-25use g_free() instead of free()Max Kellermann1-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.
2009-01-25conf: const pointers in block get functionsMax Kellermann1-1/+1
All config_get_block_*() functions should accept constant config_param pointers.
2009-01-17conf: no CamelCase, part IMax Kellermann1-1/+1
Renamed functions, types, variables.
2009-01-05fix G_BYTE_ORDER checkMax Kellermann1-1/+1
"#ifdef G_BYTE_ORDER == G_BIG_ENDIAN" cannot work, of course.
2009-01-05use GLib byte order macrosMax Kellermann1-6/+7
2009-01-01output plugins: don't include gcc.hMax Kellermann1-3/+4
Use GLib's G_GNUC_UNUSED instead of gcc.h's mpd_unused.
2008-11-25mvp: use GLib instead of utils.h/log.hMax Kellermann1-16/+27
2008-10-29output: close device on play errorMax Kellermann1-1/+0
When an output plugin fails to play a chunk, close it. This replaces various manual close() calls in nearly all plugins.
2008-10-29output: use bool for return values and flagsMax Kellermann1-13/+15
Don't return 0/-1 on success/error, but true/false. Instead of int, use bool for storing flags.
2008-10-26output: don't compile plugins which are disabledMax Kellermann1-8/+0
Don't compile the sources of disabled output plugins at all.
2008-10-26renamed src/audioOutputs/ to src/output/Max Kellermann1-0/+0
Again, no CamelCase in the directory name.
2008-10-10mvp: unsinged integersMax Kellermann1-4/+5
Fix some gcc warnings by using unsigned where appropriate. Declare numfrequencies as "const", and replaced the magic number 12 with a sizeof.
2008-10-10mvp: adapt to the new output device APIMax Kellermann1-20/+21
2008-10-10mvp: missing includesMax Kellermann1-0/+5
Again, a plugin which was disabled in my test environment and suffered from compilation errors.
2008-10-10audio_format: renamed sampleRate to sample_rateMax Kellermann1-4/+4
The last bit of CamelCase in audio_format.h. Additionally, rename a bunch of local variables.
2008-10-10audio_format: unsigned integersMax Kellermann1-1/+1
"bits" and "channels" cannot be negative.
2008-09-29use C99 struct initializersMax Kellermann1-9/+8
The old struct initializers are error prone and don't allow moving elements around. Since we are going to overhaul some of the APIs soon, it's easier to have all implementations use C99 initializers.
2008-09-24output: set audio_output->open=1 in audio_output_task()Max Kellermann1-2/+0
Since the output plugin returns a value indicating success or error, we can have the output core code assign the "open" flag.
2008-09-24output: pass audio_format to plugin.init() and plugin.open()Max Kellermann1-2/+3
Pass the globally configured audio_format as a const pointer to plugin.init(). plugin.open() gets a writable pointer which contains the audio_format requested by the plugin. Its initial value is either the configured audio_format or the input file's audio_format.
2008-09-08output: const plugin structuresMax Kellermann1-1/+1
Since the plugin struct is never modified, we should store it in constant locations.
2008-09-07output: renamed typedef AudioOutput to struct audio_outputMax Kellermann1-7/+8
Also rename AudioOutputPlugin to struct audio_output_plugin, and use forward declarations to reduce include dependencies.
2008-09-07output: added output_api.hMax Kellermann1-3/+2
Just like decoder_api.h, output_api.h provides the audio output API which is used by the plugins.