aboutsummaryrefslogtreecommitdiffstats
path: root/src/volume.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* output: use the software mixer pluginMax Kellermann2009-07-061-71/+8
| | | | | | | | | | 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.
* volume: moved range check to handle_setvol()Max Kellermann2009-07-061-10/+9
| | | | | | 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).
* volume, mixer: removed the "relative" parameterMax Kellermann2009-07-061-25/+19
| | | | | Since the "volume" command has been removed, nobody uses relative volumes anymore.
* mixer_type: moved volume_mixer_type from volume.cMax Kellermann2009-07-061-21/+22
|
* volume: removed support for legacy mixer configurationMax Kellermann2009-06-251-85/+2
| | | | | 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.
* conf: eliminated CamelCaseMax Kellermann2009-06-031-5/+5
| | | | Renamed all remaining CamelCase functions.
* volume: changed "default" to "DISABLED" in switch statementMax Kellermann2009-05-281-1/+4
| | | | | Make gcc warn us if we add a new mixer type, and forget to add a new "case" line.
* volume: converted volume_mixer_type to an enumMax Kellermann2009-05-281-5/+6
| | | | Don't use CPP macros when you can use C enums.
* volume: removed unused macro "VOLUME_MIXER_SOFTWARE_DEFAULT"Max Kellermann2009-05-281-1/+0
|
* mixer_api: moved functions to mixer_control.cMax Kellermann2009-03-141-1/+1
| | | | | | 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).
* volume: moved code to mixer_all.cMax Kellermann2009-03-141-30/+5
|
* volume: use bool instead of intMax Kellermann2009-03-141-6/+6
| | | | | Return true/false on success/failure, instead of 0/-1. Pass true/false instead of 1/0 for the "rel" boolean parameter.
* all: Update copyright header.Avuton Olrich2009-03-131-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.
* audio: moved mixer functions to mixer_control.cMax Kellermann2009-03-121-1/+1
|
* volume: removed unused variable "default_mixer"Max Kellermann2009-03-121-1/+0
|
* mixer: adding code to optionally disable all hw mixersViliam Mateicka2009-03-021-0/+3
|
* volume: throttle access to hardware mixersMax Kellermann2009-02-281-1/+24
| | | | | | 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.
* mixer: Add "disabled" mixer_type.Avuton Olrich2009-02-261-0/+3
|
* audio: moved code to output_all.cMax Kellermann2009-02-101-0/+1
| | | | | Moved code which deals with all audio outputs at once into a separate library.
* mixer: configure legacy mixer before the audio outputsMax Kellermann2009-01-251-21/+69
| | | | | | | | | 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().
* conf: const pointers in block get functionsMax Kellermann2009-01-251-1/+1
| | | | | All config_get_block_*() functions should accept constant config_param pointers.
* conf: no CamelCase, part IMax Kellermann2009-01-171-5/+5
| | | | Renamed functions, types, variables.
* removing mixer_reconfigure memmory leak, fixing configure of alsa and oss ↵Viliam Mateicka2009-01-111-0/+2
| | | | mixer (passing parameters)
* pcm_utils: moved code to pcm_volume.cMax Kellermann2009-01-071-1/+1
| | | | Moved the software volume code to a separate library.
* don't include utils.h when it isn't usedMax Kellermann2009-01-031-2/+3
|
* mixer: renamed mix_* options to mixer_*Max Kellermann2009-01-011-2/+2
| | | | There is no reason to use the shortcut "mix" instead of "mixer".
* Moving mixers to audio outputsViliam Mateicka2008-12-311-419/+89
|
* volume: use GLib loggingMax Kellermann2008-12-291-26/+29
|
* removed os_compat.hMax Kellermann2008-12-291-4/+6
| | | | | Only include headers which are really needed. os_compat.h aimed to make MPD easily portable, but was never actually made portable.
* utils: removed myFgets()Max Kellermann2008-12-281-1/+3
| | | | Replaced myFgets() with fgets() + g_strchomp().
* replaced mpd_likely/mpd_unlikely by G_LIKELY/G_UNLIKELYThomas Jansen2008-12-021-1/+1
| | | | | We want to remove gcc.h eventually. This takes care of all the G_LIKELY/G_UNLIKELY macros.
* volume: eliminate alloca() usageMax Kellermann2008-11-141-11/+4
| | | | | | 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.
* volume: moved code to oss_mixer_find()Max Kellermann2008-11-141-14/+23
|
* pcm_volume: added constant PCM_VOLUME_1Max Kellermann2008-11-111-1/+1
| | | | | | | 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.
* pcm_utils: added inline function pcm_float_to_volume()Max Kellermann2008-11-111-2/+3
|
* utils: use g_str_has_prefix() instead of prefixcmp()Max Kellermann2008-10-281-1/+3
| | | | Remove duplicated code from MPD.
* command: added command "idle"Max Kellermann2008-10-141-0/+3
| | | | | | "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.
* start using prefixcmp()Eric Wong2008-09-231-8/+4
| | | | | LOC reduction and less noise makes things easier for tired old folks to follow.
* volume: oops, only #include <alloca.h> if OSS is enabledEric Wong2008-09-231-1/+0
|
* oss: avoid heap allocations when configuring mixerEric Wong2008-09-231-13/+13
| | | | Noticed-by: Courtney Cavin
* volume: don't pass "fd" to changeVolumeLevel()Max Kellermann2008-09-071-17/+9
| | | | | The "volume" library shouldn't talk to the client. Move error handling to command.c.
* renamed player.c to player_control.cMax Kellermann2008-08-261-1/+1
| | | | | Give player.c a better name, meaning that the code is used to control the player thread.
* enable -Wpointer-arith, -Wstrict-prototypesMax Kellermann2008-08-261-1/+1
| | | | | | 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.
* clean up CPP includesMax Kellermann2008-04-121-1/+3
| | | | | | | | | 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
* fix "unreachable code" warningMax Kellermann2008-03-261-1/+0
| | | | | | 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
* fix -Wconst warningsMax Kellermann2008-02-051-6/+6
| | | | | | [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
* fixed -Wshadow warningsMax Kellermann2008-01-261-8/+8
| | | | | Signed-off-by: Eric Wong <normalperson@yhbt.net> git-svn-id: https://svn.musicpd.org/mpd/trunk@7143 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Cleanup #includes of standard system headers and put them in one placeEric Wong2008-01-031-7/+1
| | | | | | | | | | | | | This will make refactoring features easier, especially now that pthreads support and larger refactorings are on the horizon. Hopefully, this will make porting to other platforms (even non-UNIX-like ones for masochists) easier, too. os_compat.h will house all the #includes for system headers considered to be the "core" of MPD. Headers for optional features will be left to individual source files. git-svn-id: https://svn.musicpd.org/mpd/trunk@7130 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Changing all calls to ERROR() followed by exit(EXIT_FAILURE) with a singleJ. Alexander Treuman2007-05-261-2/+1
| | | | | call to FATAL(). git-svn-id: https://svn.musicpd.org/mpd/trunk@6276 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* The massive copyright updateAvuton Olrich2007-04-051-1/+1
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@5834 09075e82-0dd4-0310-85a5-a0d7c8717e4f