| Commit message (Collapse) | Author | Files | Lines |
|
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.
|
|
Flush the hardware volume cache, and send the MIXER idle event. This
allows mixer plugins to detect volume changes.
|
|
If nothing has changed since the last save, don't save the state
file. Saving will spin up the hard drive, which is undesirable on
hosts where MPD is idling in background.
|
|
Parse the state file line by line, let each subsystem probe a line.
Only the playlist_state code gets the FILE pointer to read the
following lines.
|
|
Do all the software volume stuff inside each output thread, not in the
player thread. This allows one software mixer per output device, and
also allows the user to configure the mixer type (hardware or
software) for each audio output.
This moves the global "mixer_type" setting into the "audio_output"
section, deprecating the "mixer_enabled" flag.
|
|
Converted the range checks in volume_level_change() to assertions.
Changed all volume types to "unsigned", expect for those which must be
able to indicate error (-1).
|
|
Since the "volume" command has been removed, nobody uses relative
volumes anymore.
|
|
|
|
The top-level "mixer_device" and "mixer_control" options have been
deprecated by MPD 0.15, and it's safe to remove them in MPD 0.16.
|
|
Renamed all remaining CamelCase functions.
|
|
Make gcc warn us if we add a new mixer type, and forget to add a new
"case" line.
|
|
Don't use CPP macros when you can use C enums.
|
|
|
|
mixer_control.h should provide the functions needed to manipulate a
mixer, without exposing the internal mixer API (which is provided by
mixer_api.h).
|
|
|
|
Return true/false on success/failure, instead of 0/-1. Pass
true/false instead of 1/0 for the "rel" boolean parameter.
|
|
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.
|
|
|
|
|
|
|
|
On some hardware, reading the mixer value from hardware is an
expensive operation, and MPD has to do it for every client. Throttle
access to the hardware, cache the result for one second.
|
|
|
|
Moved code which deals with all audio outputs at once into a separate
library.
|
|
Reimplemented the legacy mixer configuration: copy the deprecated
configuration values into the audio_output section. Don't configure
the mixers twice (once for the audio_output, and a second time for the
legacy values).
This requires volume_init() to be called before initAudioDriver().
|
|
All config_get_block_*() functions should accept constant config_param
pointers.
|
|
Renamed functions, types, variables.
|
|
mixer (passing parameters)
|
|
Moved the software volume code to a separate library.
|
|
|
|
There is no reason to use the shortcut "mix" instead of "mixer".
|
|
|
|
|
|
Only include headers which are really needed. os_compat.h aimed to
make MPD easily portable, but was never actually made portable.
|
|
Replaced myFgets() with fgets() + g_strchomp().
|
|
We want to remove gcc.h eventually. This takes care of all the
G_LIKELY/G_UNLIKELY macros.
|
|
alloca() is not a portable function. Don't use it. Using
strncasecmp() is much more efficient anyway, because no memory needs
to be allocated and copied.
|
|
|
|
It may be desirable to change the range of integer volume levels
(e.g. to 1024, which may utilize shifts instead of expensive integer
divisions). Introduce the constant PCM_VOLUME_1 which describes the
integer value for "100% volume". This is currently 1000.
|
|
|
|
Remove duplicated code from MPD.
|
|
"idle" waits until something noteworthy happens on the server,
e.g. song change, playlist modified, database updated. This allows
clients to keep up to date without polling.
|
|
LOC reduction and less noise makes things easier for
tired old folks to follow.
|
|
|
|
Noticed-by: Courtney Cavin
|
|
The "volume" library shouldn't talk to the client. Move error
handling to command.c.
|
|
Give player.c a better name, meaning that the code is used to control
the player thread.
|
|
Also enable -Wunused-parameter - this forces us to add the gcc
"unused" attribute to a lot of parameters (mostly library callback
functions), but it's worth it during code refactorizations.
|
|
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
|
|
There is unreachable code at several positions, e.g. after an
#if/#end, or after an endless loop. Remove that.
git-svn-id: https://svn.musicpd.org/mpd/trunk@7197 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
[ew: cleaned up the dirty union hack a bit]
Signed-off-by: Eric Wong <normalperson@yhbt.net>
git-svn-id: https://svn.musicpd.org/mpd/trunk@7180 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|