summaryrefslogtreecommitdiffstats
path: root/audio/mixer.h
Commit message (Collapse)AuthorAgeFilesLines
* mixer: make struct opaquewm42013-09-201-28/+14
| | | | Also remove stray include statements from ao_alsa and ao_oss.
* mixer: restore volume with playback resumewm42013-09-201-0/+1
| | | | | | | | | Note that this is intentionally never done if the AO or softvolume is different, or if the current volume control method is thought to control system wide volume (such as ALSA) or otherwise user controllable (such as PulseAudio). The intention is to keep things robust and to avoid messing with the user's audio settings as far as possible, while still providing the ability to resume volume if it makes sense.
* mixer: refactor, fix some aspects of --volume handlingwm42013-09-191-6/+10
| | | | | | | | | | | | | | | | | | | | Refactor how mixer.c does volume/mute restoration and initialization. Move to handling of --volume and --mute to mixer.c. Simplify the implementation of these and hopefully fix bugs/strange behavior related to using them as file-local options (this uses a somewhat dirty trick: the option values are reverted to "auto" after initialization). Put most code related to initialization and volume restoring in probe_softvol() and restore_volume(). Having this code all in one place is less confusing. Instead of trying to detect whether to use softvol at runtime, detect it at initialization time using AOCONTROL_GET_VOLUME (same with mute, AOCONTROL_GET_MUTE). This implies we expect SET_VOLUME/SET_MUTE to work if the GET variants work. Hopefully this is always the case. This is also preparation for being able to change volume/mute settings if audio is disabled, and for allowing restoring value with playback resume.
* mixer: minor refactoringwm42013-09-191-5/+4
| | | | | Let struct mixer access access MPOpts to simplify some things. Rename some variables and functions. There should be no functional changes.
* mplayer: keep volume persistent, even when using --volumewm42013-04-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consider: mpv --volume 10 file1.mkv file2.mkv Before this commit, the volume was reset to 10 when playing file2.mkv. This was inconsistent to most other options. E.g. --brightness is a rather similar case. In general, settings should never be reset when playing the next file, unless the option was explicitly marked file-local. This commit corrects the behavior of the --volume and --mute options. File local --volume still works as expected: mpv --{ --volume 10 file1.mkv file2.mkv --} This sets the volume always to 10 on playback start. Move the m_config_leave_file_local() call down so that the mixer code in uninit_player() can set the option volume and mute variables without overwriting the global option values. Another subtle issue is that we don't want to set volume if there's no need to, which is why the user_set_volume/mute fields are introduced. This is important because setting the volume might change the system volume depending on other options.
* Rename directories, move files (step 2 of 2)wm42012-11-121-3/+0
| | | | | | | | | | | | Finish renaming directories and moving files. Adjust all include statements to make the previous commit compile. The two commits are separate, because git is bad at tracking renames and content changes at the same time. Also take this as an opportunity to remove the separation between "common" and "mplayer" sources in the Makefile. ("common" used to be shared between mplayer and mencoder.)
* Rename directories, move files (step 1 of 2) (does not compile)wm42012-11-121-0/+61
Tis drops the silly lib prefixes, and attempts to organize the tree in a more logical way. Make the top-level directory less cluttered as well. Renames the following directories: libaf -> audio/filter libao2 -> audio/out libvo -> video/out libmpdemux -> demux Split libmpcodecs: vf* -> video/filter vd*, dec_video.* -> video/decode mp_image*, img_format*, ... -> video/ ad*, dec_audio.* -> audio/decode libaf/format.* is moved to audio/ - this is similar to how mp_image.* is located in video/. Move most top-level .c/.h files to core. (talloc.c/.h is left on top- level, because it's external.) Park some of the more annoying files in compat/. Some of these are relicts from the time mplayer used ffmpeg internals. sub/ is not split, because it's too much of a mess (subtitle code is mixed with OSD display and rendering). Maybe the organization of core is not ideal: it mixes playback core (like mplayer.c) and utility helpers (like bstr.c/h). Should the need arise, the playback core will be moved somewhere else, while core contains all helper and common code.