aboutsummaryrefslogtreecommitdiff
path: root/src/output_internal.h
Commit message (Collapse)AuthorAge
* FilterInternal: convert struct filter to a OO interfaceMax Kellermann2013-02-02
|
* output_internal, ...: add extern "C"Max Kellermann2013-01-15
|
* output: new option "tags" may be used to disable sending tagsMax Kellermann2012-09-25
| | | | Implements Mantis ticket 0003340.
* output_plugin: the plugin allocates the audio_output objectMax Kellermann2011-09-19
| | | | | | 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.
* Merge branch 'v0.16.x'Max Kellermann2011-09-01
|\ | | | | | | | | | | Conflicts: configure.ac src/output_control.c
| * output_thread: reimplement CANCEL synchronizationMax Kellermann2011-09-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The output thread could hang indefinitely after finishing CANCEL, because it could have missed the signal while the output was not unlocked in ao_command_finished(). This patch removes the wait() call after CANCEL, and adds the flag "allow_play" instead. While this flag is set, playback is skipped. With this flag, there will not be any excess wait() call after the pipe has been cleared. This patch fixes a bug that causes mpd to discontinue playback after seeking, due to the race condition described above.
* | output_control: move code to audio_output_destruct()Max Kellermann2011-08-30
| | | | | | | | .. and destruct the output object properly in test/run_output.
* | copyright year 2011Max Kellermann2011-01-29
| |
* | player_control: removed the global variable "pc"Max Kellermann2011-01-10
|/ | | | | | | Allocate a player_control object where needed, and pass it around. Each "client" object is associated with a "player_control" instance. This prepares multi-player support.
* Merge release 0.15.14 from branch 'v0.15.x'Max Kellermann2010-11-07
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: NEWS configure.ac src/decoder_control.c src/decoder_control.h src/input/rewind_input_plugin.c src/output_control.c src/output_thread.c src/player_thread.c
| * output_internal: protect attribute "fail_timer" with mutexMax Kellermann2010-11-04
| |
* | output_thread: call replay gain filter manuallyMax Kellermann2010-05-02
| | | | | | | | | | | | Don't add it to the filter chain, because we need to apply replay gain before cross-fading with the next song. Add a second replay_gain filter which is used for the song being faded in (chunk->other).
* | player_thread: move cross-fading to output threadMax Kellermann2010-05-02
| | | | | | | | | | Remove cross_fade_apply(), and call pcm_mix() in the output thread, mixing the chunk and chunk->other together.
* | output: added option "always_on" for radio stationsMax Kellermann2010-03-10
| | | | | | | | | | | | | | Did you ever accidently click "stop" while feeding a radio station? This option sets the output device to "pause" to disable the "close" method. It falls back to "pause" then, which is specific to the plugin. Some plugins implement it by feeding silence.
* | replay_gain: reimplement as a filter pluginMax Kellermann2010-02-17
| | | | | | | | | | | | | | Apply the replay gain in the output thread. This means a new setting will be active instantly, without going through the whole music pipe. And we might have different replay gain settings for each audio output device.
* | Update copyright notices.Avuton Olrich2009-12-31
| |
* | output_thread: added command DRAINMax Kellermann2009-11-09
| | | | | | | | | | This command manually drains the hardware buffer. This is useful when the player thread want to make sure that everything has been played.
* | output: consistently lock audio output objectsMax Kellermann2009-10-29
| | | | | | | | | | Always keep the audio_output object locked within the output thread, unless a plugin method is called. This fixes several race conditions.
* | output_plugin: added methods enable() and disable()Max Kellermann2009-10-23
| | | | | | | | | | | | | | With these methods, an output plugin can allocate some global resources only if it is actually enabled. The method enable() is called after daemonization, which allows for more sophisticated resource allocation during that method.
* | output: convert config_audio_format to an audio_format structMax Kellermann2009-10-21
| | | | | | | | This allows more sophisticated audio format selection.
* | Merged release 0.15.2 from branch 'v0.15.x'Max Kellermann2009-08-15
|\| | | | | | | | | | | | | Conflicts: NEWS configure.ac
| * output: fixed shout stuck pause bugMax Kellermann2009-08-14
| | | | | | | | | | | | Explicitly make the output thread leave the ao_pause() loop. This patch is a workaround, and the "pause" flag is not managed in a thread-safe way, but that's good enough for now.
* | output: attach a filter chain to each audio_outputMax Kellermann2009-07-06
| | | | | | | | | | | | | | | | This patch adds initial filter support for audio outputs. Each audio output gets a "filter" attribute, which is used by ao_play_chunk(). The PCM conversion is now performed by convert_filter_plugin. audio_output.convert_state has been removed.
* | output: added command REOPENMax Kellermann2009-07-06
|/ | | | | REOPEN is called when the input audio format changes. The output thread may be reconfigure the PCM converter.
* output_plugin: replaced output_plugin.get_mixer() with mixer_pluginMax Kellermann2009-03-26
| | | | | | The mixer core library is now responsible for creating and managing the mixer object. This removes duplicated code from the output plugins.
* output: protect audio_output.open with the mutexMax Kellermann2009-03-25
| | | | | | There was a deadlock between the output thread and the player thread: when the output thread failed (and closed itself) while the player thread worked with the audio_output object, MPD could crash.
* output: convert audio_output.config_audio_format to booleanMax Kellermann2009-03-20
| | | | | | | The config_audio_format used to contain the configured audio format, which is copied to out_audio_format. Let's convert the former to a boolean, which indicates whether out_audio_format was already set. This simplifies some code and saves a few bytes.
* all: Update copyright header.Avuton Olrich2009-03-13
| | | | | | | | 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.
* output: play from a music_pipe objectMax Kellermann2009-03-09
| | | | | | | | Instead of passing individual buffers to audio_output_all_play(), pass music_chunk objects. Append all those chunks asynchronously to a music_pipe instance. All output threads may then read chunks from this pipe. This reduces MPD's internal latency by an order of magnitude.
* output: use GTimer instead of time_t for reopen after failureMax Kellermann2009-02-28
| | | | | | | time() is not a monotonic timer, and MPD might get confused by clock skews. clock_gettime() provides a monotonic clock, but is not portable to non-POSIX systems (i.e. Windows). This patch uses GLib's GTimer API, which aims to be portable.
* output: pass the music chunk pointer as void*, not char*Max Kellermann2009-02-23
| | | | | | 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: include cleanupMax Kellermann2009-02-16
| | | | | Don't include output_api.h in output_internal.h. This change requires adding missing includes in several sources.
* output_api: moved "enum output_command" to output_internal.hMax Kellermann2009-02-16
| | | | | Now that the output_command enum isn't exposed to output plugins anymore, we can hide its definition within output_internal.h.
* output_api: no CamelCase in struct audio_outputMax Kellermann2009-02-10
| | | | Renamed audio_output struct members.
* output_internal: added missing output_api.h includeMax Kellermann2009-02-10
| | | | output_api.h is required for enum audio_output_command.
* pcm_convert: return PCM buffer from pcm_convert()Max Kellermann2009-01-17
| | | | | | Removed yet another superfluous buffer layer: return the PCM buffer from pcm_convert() instead of copying PCM data into the caller-supplied buffer.
* pcm_utils: moved conversion code to pcm_convert.cMax Kellermann2009-01-07
| | | | | All what's left in pcm_utils.h is the pcm_range() utility function, which is only used internally by pcm_volume and pcm_mix.
* output: migrate from pthread to glib threadsThomas Jansen2008-12-28
|
* notify: use GLib lockingMax Kellermann2008-12-27
| | | | | Use GLib locking (GMutex, GCond) instead of pthread because GLib is more portable, e.g. on mingw32.
* added prefix to header macrosMax Kellermann2008-10-31
| | | | | | | "LOG_H" is a macro which is also used by ffmpeg/log.h. This is ffmpeg's fault, because short macros should be reserved for applications, but since it's always a good idea to choose prefixed macro names, even for applications, we are going to do that in MPD.
* output: removed audio_output.resultMax Kellermann2008-10-29
| | | | | Since open() and play() close the device on error, we can simply check audio_output.open instead of audio_output.result after a call.
* output: delay reopen after device failureMax Kellermann2008-10-29
| | | | | | | When one of several output devices failed, MPD tried to reopen it quite often, wasting a lot of resources. This patch adds a delay: wait 10 seconds before retrying. This might be changed to exponential delays later, but for now, it makes the problem go away.
* output: moved audioDeviceStates to audio_output.enabledMax Kellermann2008-10-29
|
* output: use bool for return values and flagsMax Kellermann2008-10-29
| | | | | Don't return 0/-1 on success/error, but true/false. Instead of int, use bool for storing flags.
* pcm_utils: renamed ConvState to struct pcm_convert_stateMax Kellermann2008-10-21
| | | | No CamelCase, and a struct instead of a typedef.
* output: removed DEVICE_ON, DEVICE_OFFMax Kellermann2008-09-24
| | | | | | | To check whether a device is really on or off, we should rather check audio_output.open, instead of managing another variable. Wrap audio_output.open in the inline function audio_output_is_open() and use it instead of DEVICE_ON and DEVICE_OFF.
* output: semi-asynchronous playbackMax Kellermann2008-09-24
| | | | | | | Send an output buffer to all output plugins at the same time, instead of waiting for each of them separately. Make several functions non-blocking, and introduce the new function audio_output_wait_all() to synchronize with all audio output threads.
* output: document the audio_output elementsMax Kellermann2008-09-24
|
* output: make "struct audio_output" opaque for output pluginsMax Kellermann2008-09-24
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.