aboutsummaryrefslogtreecommitdiffstats
path: root/src/OutputAll.hxx (unfollow)
Commit message (Collapse)AuthorFilesLines
2013-08-03audio_format: convert to C++Max Kellermann1-4/+3
2013-07-30include cleanupMax Kellermann1-3/+0
2013-01-07mixer_all: convert to C++Max Kellermann1-0/+0
2013-01-05filter/ReplayGain: add method _set_mode()Max Kellermann1-0/+4
Push the new mode to the filter instead of accessing global variables through replay_gain_get_real_mode().
2012-08-08output_all: add basic GError supportMax Kellermann1-2/+5
2011-01-29copyright year 2011Max Kellermann1-1/+1
2011-01-10player_control: removed the global variable "pc"Max Kellermann1-2/+3
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.
2010-03-10output: added option "always_on" for radio stationsMax Kellermann1-0/+7
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.
2010-01-02output_all: reset elapsed_time at song borderMax Kellermann1-0/+6
Another quirk fixed: after the last chunk of a song has been played, the "elapsed_time" variable is set to the chunk's time stamp. When the client receives the PLAYER idle event and asks MPD for the current time stamp, MPD will return the last time stamp of the previous song when it hasn't played the first chunk of the current song yet.
2009-12-31Update copyright notices.Avuton Olrich1-1/+1
2009-11-09output_thread: added command DRAINMax Kellermann1-0/+6
This command manually drains the hardware buffer. This is useful when the player thread want to make sure that everything has been played.
2009-10-30{player,output}_thread: fixed elapsed_time quirksMax Kellermann1-1/+2
Right after seeking and song change, the elapsed_time shows old information, because the output thread didn't finish a full chunk yet. This patch re-adds a second elapsed_time variable, and keeps track of a fallback value, in case the output thread can't provide a reliable value.
2009-10-23output_plugin: added methods enable() and disable()Max Kellermann1-0/+7
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.
2009-10-08player_thread: get "elapsed" from audio outputsMax Kellermann1-0/+7
Tracking the "elapsed" time from the chunks which we have sent to the output pipe is very imprecise: since we have implemented the music pipe, we're sending large number of chunks at once, giving the "elapsed" time stamp a resolution of usually more than a second. This patch changes the source of this information to the outputs. If a chunk has been played by all outputs, the "elapsed" time stamp is updated. The new command PLAYER_COMMAND_REFRESH makes the player thread update its status information: it tells the outputs to update the chunk time stamp. After that, player_control.elapsed_time is current.
2009-03-25output_all: moved code to audio_output_all_wait()Max Kellermann1-0/+11
Synchronization with the output thread will be implemented in output_all.c, not in player_thread.c. Currently, that's just a simple g_usleep(1ms).
2009-03-13all: Update copyright header.Avuton Olrich1-3/+4
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-09output: play from a music_pipe objectMax Kellermann1-7/+16
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.
2009-02-10output_all: added API documentationMax Kellermann1-0/+33
2009-02-10output_all: no CamelCaseMax Kellermann1-10/+18
Renamed functions and variables.
2009-02-10audio: moved code to output_all.cMax Kellermann1-27/+11
Moved code which deals with all audio outputs at once into a separate library.
2009-02-10audio: moved protocol code to output_print.cMax Kellermann1-3/+0
2009-02-10audio: moved state file code to output_state.cMax Kellermann1-5/+1
2009-02-10audio: removed isCurrentAudioFormat()Max Kellermann1-2/+0
This function isn't used anymore.
2009-02-10audio: added output enumeration functionsMax Kellermann1-0/+13
Added audio_output_get(), audio_output_find().
2009-02-10audio: added audio_output_config_count()Max Kellermann1-0/+4
audio_output_config_count() returns the number of audio outputs in the configuration file. It is only used by initAudioDriver(). The public function audio_output_count() now returns audioOutputArraySize.
2009-01-25mixer: removed mixer_configure_legacy(), AC_MIXER_CONFIGUREMax Kellermann1-1/+0
Those have been superseded by the new legacy configuration code.
2009-01-17conf: no CamelCase, part IMax Kellermann1-2/+2
Renamed functions, types, variables.
2008-12-31Moving mixers to audio outputsViliam Mateicka1-0/+5
2008-12-31exporting functionsViliam Mateicka1-0/+2
2008-10-31added prefix to header macrosMax Kellermann1-2/+2
"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.
2008-10-29output: use bool for return values and flagsMax Kellermann1-2/+2
Don't return 0/-1 on success/error, but true/false. Instead of int, use bool for storing flags.
2008-10-08use the "bool" data type instead of "int"Max Kellermann1-1/+2
"bool" should be used in C99 programs for boolean values.
2008-10-08don't include os_compat.hMax Kellermann1-1/+1
When there are standardized headers, use these instead of the bloated os_compat.h.
2008-09-29audio_output: added method pause()Max Kellermann1-0/+2
pause() puts the audio output into pause mode: if supported, it may perform a special action, which keeps the device open, but does not play anything. Output plugins like "shout" might want to play silence during pause, so their clients won't be disconnected. Plugins which do not support pausing will simply be closed, and have to be reopened when unpaused. This pach includes an implementation for the shout plugin, which sends silence chunks.
2008-09-10audio: removed isAudioDeviceOpen()Max Kellermann1-2/+0
The function isAudioDeviceOpen() is never used.
2008-09-09audio: moved cmpAudioFormat() to audio_format.hMax Kellermann1-2/+0
Rename it to audio_format_equals() and return "true" if they are equal.
2008-09-09audio: replaced copyAudioFormat() with simple assignmentMax Kellermann1-2/+0
The "!src" check in copyAudioFormat() used to hide bugs - one should never pass NULL to it. There is one caller which might pass NULL, add a check in this caller. Instead of doing mempcy(), we can simply assign the structures, which looks more natural.
2008-09-08output: static audio_output_plugin list as arrayMax Kellermann1-1/+0
Instead of having to register each output plugin, store them statically in an array. This eliminates the need for the List library here, and saves some small allocations during startup.
2008-09-07audio_format: converted typedef AudioFormat to struct audio_formatMax Kellermann1-8/+8
Get rid of CamelCase, and don't use a typedef, so we can forward-declare it, and unclutter the include dependencies.
2008-09-07audio: don't pass "fd" to printAudioDevices()Max Kellermann1-1/+2
Pass the client struct instead.
2008-09-07audio: don't pass "fd" to {en,dis}ableAudioDevice()Max Kellermann1-2/+2
No protocol code in the audio output library.
2008-09-06include cleanupMax Kellermann1-1/+2
As usual, include only headers which are really needed.
2008-08-29tag: renamed MpdTag and MpdTagItem to struct tag, struct mpd_tag_itemMax Kellermann1-1/+1
Getting rid of CamelCase; not having typedefs also allows us to forward-declare the structures.
2008-08-29pass constant pointersMax Kellermann1-1/+1
And again, convert arguments to const.
2008-08-26moved struct AudioFormat to audio_format.hMax Kellermann1-12/+1
We want to expose the AudioFormat structure to plugins; remove some clutter by moving its declaration to a separate header file.
2008-06-02remove audioDeviceStates from playerData and getPlayerDataEric Wong1-2/+0
git-svn-id: https://svn.musicpd.org/mpd/trunk@7372 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2008-04-12const pointers in audio.cMax Kellermann1-5/+6
git-svn-id: https://svn.musicpd.org/mpd/trunk@7344 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2008-04-12clean up CPP includesMax Kellermann1-2/+0
Try to only include headers which are really needed. We should particularly check all "headers including other headers". The long-term goal is to have a manageable, small API for plugins (decoders, output) without so many mpd internals cluttering the namespace. git-svn-id: https://svn.musicpd.org/mpd/trunk@7319 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2008-04-12use size_t in audio.cMax Kellermann1-1/+1
Buffer sizes should be size_t. This is safe here, at least not unsafer than without the patch. I have no idea why audioBufferSize and audioBufferPos were explicitly declared as signed integer. git-svn-id: https://svn.musicpd.org/mpd/trunk@7296 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2008-04-12moved expression to audioFormatSizeToTime()Max Kellermann1-0/+5
The multi-line expression which calculates sizeToTime is hard to read, partly because "cb->audioFormat." is too long. Create a separate inline function in audio.h for that. git-svn-id: https://svn.musicpd.org/mpd/trunk@7277 09075e82-0dd4-0310-85a5-a0d7c8717e4f