aboutsummaryrefslogtreecommitdiffstats
path: root/src/output/AoOutputPlugin.cxx (unfollow)
Commit message (Collapse)AuthorFilesLines
2013-10-02Log: new logging library APIMax Kellermann1-5/+3
Prepare to migrate away from GLib. Currently, we're still using GLib as a backend.
2013-09-04util/Error: new error passing libraryMax Kellermann1-26/+23
Replaces GLib's GError.
2013-08-04OutputPlugin: pass config_param referenceMax Kellermann1-8/+8
2013-08-03audio_format: convert to C++Max Kellermann1-7/+7
2013-07-30tag: convert to C++Max Kellermann1-0/+2
2013-07-30output_api: convert to C++Max Kellermann1-1/+1
2013-04-17output/ao: convert to C++Max Kellermann1-58/+83
2012-03-06use g_strerror() instead of strerror()Max Kellermann1-1/+1
Make sure we get a UTF-8 encoded string.
2011-09-19output_plugin: the plugin allocates the audio_output objectMax Kellermann1-12/+23
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-07-18output/ao: add missing g_free in error pathJonathan Neuschäfer1-0/+3
2011-02-15Insure proper initialization of stack-allocated struct.Christopher Brannon1-1/+4
Version 1.0.0 of the libao library added a new field to the ao_sample_format struct. It is a char * named matrix. When an ao_sample_format is allocated on the stack, this field contains garbage. The proper course is to insure that is initialized to NULL. NULL indicates that we do not want any mapping. The struct is now initialized using a static initializer, and this technique is compatible with all known versions of libao.
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/+17
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-1/+2
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-03-13all: Update copyright header.Avuton Olrich1-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.
2009-02-26output_plugin: report errors with GErrorMax Kellermann1-16/+36
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-25ao: no CamelCaseMax Kellermann1-48/+41
Renamed functions and variables.
2009-02-25ao: removed AoData.device!=NULL checksMax Kellermann1-12/+1
The MPD core guarantees that the audio_output object is always in a consistent state: either open or closed. When open, it will not call the open() method again, and when closed, it will not call play(). Removed several checks and the NULL initialization.
2009-02-25ao: removed implementation of method cancel()Max Kellermann1-6/+0
The method is empty, and we can simply set the method pointer to NULL instead.
2009-02-25output_plugin: don't pass audio_output object to method init()Max Kellermann1-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.
2009-02-25output_api: removed audio_output_get_name()Max Kellermann1-2/+2
Use config_get_block_string("name") instead of audio_output_get_name().
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-13/+7
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-10ao: declare AoData.writeSize as size_tMax Kellermann1-3/+3
writeSize is a memory size and its type should thus be size_t. This allows us to remove two explicit casts.
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-18conf: added config_get_block_unsigned()Max Kellermann1-10/+1
Eliminate some more getBlockParam() invocations.
2009-01-18conf: added config_get_block_string()Max Kellermann1-9/+8
This replaces lots of getBlockParam() invocations.
2009-01-17conf: no CamelCase, part IMax Kellermann1-4/+5
Renamed functions, types, variables.
2009-01-03ao: use g_strsplit() instead of strtok_r()Max Kellermann1-37/+15
g_strsplit() is more portable than strtok_r().
2009-01-01output plugins: don't include gcc.hMax Kellermann1-2/+2
Use GLib's G_GNUC_UNUSED instead of gcc.h's mpd_unused.
2008-12-09ao: use 16 bit sample formatMax Kellermann1-0/+6
There have been bug reports on MPD regarding 24 bit output via libao/esd. The "ao" plugin does not attempt fall back to 16 bit currently, and thus fails to play 24 bit audio (i.e. all mp3 files). Make it always use 16 bit samples for now, until more bits are well-tested.
2008-11-25ao: print error message when ao_open_live() failsMax Kellermann1-1/+3
When ao_open_live() failed, MPD would ignore the error code in "errno". Make it print a meaningful error message.
2008-11-25ao: support all libao error codesMax Kellermann1-9/+29
The function audioOutputAo_error() did not implement all possible libao error codes. Support the rest of them, and fall back to strerror().
2008-11-25ao: use GLib instead of utils.h/log.hMax Kellermann1-19/+21
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-8/+9
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-10audio_format: renamed sampleRate to sample_rateMax Kellermann1-1/+1
The last bit of CamelCase in audio_format.h. Additionally, rename a bunch of local variables.
2008-09-29use C99 struct initializersMax Kellermann1-9/+7
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: make "struct audio_output" opaque for output pluginsMax Kellermann1-19/+16
We have eliminated direct accesses to the audio_output struct from the all output plugins. Make it opaque for them, and move its real declaration to output_internal.h, similar to decoder_internal.h. Pass the opaque structure to plugin.init() only, which will return the plugin's data pointer on success, and NULL on failure. This data pointer will be passed to all other methods instead of the audio_output struct.
2008-09-24output: added audio_output_get_name()Max Kellermann1-1/+1
Reduce direct accesses to the audio_output struct from the plugins: this time, eliminate all accesses to audio_output.name. The name is required by some plugins for log messages.
2008-09-24output: set audio_output->open=1 in audio_output_task()Max Kellermann1-4/+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-4/+6
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/+7
Also rename AudioOutputPlugin to struct audio_output_plugin, and use forward declarations to reduce include dependencies.