summaryrefslogtreecommitdiffstats
path: root/libao2/audio_out.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/master'wm42012-04-011-1/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: bstr.c bstr.h etc/input.conf input/input.c input/input.h libao2/ao_pulse.c libmpcodecs/vf_ass.c libmpcodecs/vf_vo.c libvo/gl_common.c libvo/x11_common.c mixer.c mixer.h mplayer.c
| * ao_pulse, core: make pulse thread wake up core for more dataUoti Urpala2012-03-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For ao_pulse, the current latency is not a good indicator of how soon the AO requires new data to avoid underflow. Add an internal pipe that can be used to wake up the input loop from select(), and make the pulseaudio main loop (which runs in a separate thread) use this mechanism when pulse requests more data. The wakeup signal currently contains no information about the reason for the wakup, but audio buffers are always filled when the event loop wakes up. Also, request a latency of 1 second from the Pulseaudio server. The default is normally significantly higher. We don't need low latency, while higher latency helps prevent underflows reduces need for wakeups.
| * options: move mixer.h options to structUoti Urpala2012-03-201-0/+1
| |
* | mixer, libao: add proper mute controlwm42012-01-181-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mixer frontend code can now make use of a proper system mixer mute toggle, if the audio output driver supports it. The consequence is that, if support is available, mplayer will no longer temporarily set the system volume to 0 if mute is enabled. Generally, the code now deals with the following combinations of available AO features: - software volume control forced by user (--softvol / soft_vol flag) => if enabled, never touch the "hardware" controls - "hardware"/driver volume control available (whether AOCONTROL_GET/SET_VOLUME works) => if not available, enable volume controls by enabling softvol - "hardware"/driver mute control (AOCONTROL_GET/SET_MUTE) => if not available, emulate by setting volume to 0 - whether the volume+mute controls are kept or not when the AO is closed (indicated by ao->no_persistent_volume) => if not persistent, restore the volume/mute next time the AO is opened
* | mixer: restore volume with audio output drivers without persistent volumewm42012-01-181-0/+1
|/ | | | | | | | | | | | | | | Some audio outputs don't provide access to a system-wide mixer control, and do per-application audio mixing. Further, some of these forget the volume as soon as the audio device is closed. This can be annoying, because mplayer will "forget" the volume when playing a new file or when crossing ordered chapter boundaries. Support restoring the volume on audio reinitialization if an audio output driver knowingly behaves this way. (This doesn't change that mplayer never writes any settings into the config file, including volume settings.) This commit doesn't yet change any actual output driver to use this code. Hopefully make some logic in the volume restore code a bit more robust.
* audio: export audio pts to AO driversUoti Urpala2011-07-311-1/+2
| | | | | Currently the pts value is not directly used by any AO. Will be used by encoding code.
* audio: move ready-for-ao data buffer from decoder to AOUoti Urpala2011-07-021-0/+4
| | | | | | | | | | | | Move the buffer storing audio data ready to be fed to the audio output driver from the audio decoder object to the AO object. This will help encoding code deal with end of input, and may also be useful to improve other general gapless audio behavior (as AOs which do not accept chunks smaller than a certain size may keep them in the buffer while the decoder changes). Less data may be dropped now when changing audio filters or switching timeline parts.
* ao_pcm, core: use new API in ao_pcm, change timing with itUoti Urpala2011-05-051-0/+1
| | | | | | | | | | | | | | | | | Change ao_pcm to use the new audio output driver API and clean up some of the code. Rewrite the logic controlling how playback timing works when using -ao pcm. Deprecate the "fast" suboption; its only effect now is to print a warning, but it's still accepted so that specifying it is not an error. Before, timing with -ao pcm and video enabled had two possible modes. In the default mode playback speed was rather arbitrary - not realtime, but not particularly fast. -ao pcm:fast tried to play back at maximum video playback speed - mostly succeeding, but not quite guaranteed to work in all cases. Now the default is to play at realtime speed. The -benchmark option can now be used to get faster playback (same as the video-only case). In the audio-only case playback is always maximum speed.
* audio output: add a new AO driver APIUoti Urpala2011-05-051-4/+31
| | | | | | | Add a new audio output driver API. The main change is the addition of a context struct where data can be kept instead of using globals. The old API remains available. This commit does not yet convert any driver to use the new API.
* cleanup: reindent audio_out.[ch]Uoti Urpala2011-05-041-35/+30
| | | | | | Reindent audio_out.c and audio_out.h. Also remove trailing '_s' from two struct names (which are not currently used anywhere) and make the audio_out_drivers[] table static.
* audio: change external AO interface to "ao_[method](ao, ...)"Uoti Urpala2011-04-091-5/+18
| | | | | | | | Make the outside interface of audio output handling similar to the video output one. An AO object is first created, and then methods called with ao_[methodname](ao, args...). However internally libao2/ still holds all data in globals, and trying to create multiple simultaneous AO instances won't work.
* Remove trailing whitespace from most filesUoti Urpala2009-07-071-2/+2
|
* Merge svn changes up to r28862Uoti Urpala2009-03-071-1/+1
|\
| * Make ao_info_t structs const.reimar2009-03-061-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28858 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r28403Uoti Urpala2009-01-311-0/+18
|\|
| * Add standard license headers.diego2009-01-261-0/+18
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28378 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Remove _s/_st suffix from some struct namesUoti Urpala2008-04-251-2/+1
|/ | | | | Since the names are always used after the keyword "struct" having a suffix as in "struct demuxer_st" is almost completely pointless.
* Add MPLAYER_ prefix to multiple inclusion guards.diego2008-02-221-4/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26061 b3059339-0415-0410-9bf9-f77b7e298cf2
* ao_functions_t should be const, part 1reimar2008-02-011-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25945 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add explanatory comments to the #endif part of multiple inclusion guards.diego2007-12-311-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25563 b3059339-0415-0410-9bf9-f77b7e298cf2
* Do not use leading underscores in multiple inclusion guards, they are reserved.diego2007-07-021-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23709 b3059339-0415-0410-9bf9-f77b7e298cf2
* Rewrite audio EOF handling logic fixing some problems that could causeuau2006-06-161-0/+2
| | | | | | | | truncation of output, set flag AOPLAY_FINAL_CHUNK in play call to tell ao there will be no more data beyond what's in current buffer. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18738 b3059339-0415-0410-9bf9-f77b7e298cf2
* Patch by Stefan Huehner / stefan % huehner ! org \rathann2006-02-091-6/+6
| | | | | | | | | | | | | | | | | | | | | | patch replaces '()' for the correct '(void)' in function declarations/prototypes which have no parameters. The '()' syntax tell thats there is a variable list of arguments, so that the compiler cannot check this. The extra CFLAG '-Wstrict-declarations' shows those cases. Comments about a similar patch applied to ffmpeg: That in C++ these mean the same, but in ANSI C the semantics are different; function() is an (obsolete) K&R C style forward declaration, it basically means that the function can have any number and any types of parameters, effectively completely preventing the compiler from doing any sort of type checking. -- Erik Slagter Defining functions with unspecified arguments is allowed but bad. With arguments unspecified the compiler can't report an error/warning if the function is called with incorrect arguments. -- Måns Rullgård git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17567 b3059339-0415-0410-9bf9-f77b7e298cf2
* unused definitions removedalex2005-01-311-4/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14619 b3059339-0415-0410-9bf9-f77b7e298cf2
* uninit immed flagalex2004-04-061-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12146 b3059339-0415-0410-9bf9-f77b7e298cf2
* 64bit libao2 fix by Jens Axboe <mplayer-dev@kernel.dk>alex2003-03-211-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9634 b3059339-0415-0410-9bf9-f77b7e298cf2
* audio out driver list support (example: -ao alsa9,sdl:esd,oss,sdl:oss,)arpi2002-09-291-1/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7564 b3059339-0415-0410-9bf9-f77b7e298cf2
* - add some control (ao_oss, pl_extrastereo)pontscho2002-07-251-1/+5
| | | | | | | - cosmetic git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6796 b3059339-0415-0410-9bf9-f77b7e298cf2
* added audio_out_format_bits to calc len alignmentiive2002-05-091-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6027 b3059339-0415-0410-9bf9-f77b7e298cf2
* Changes to audio out plugin, first plugin addedanders2001-11-251-0/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3108 b3059339-0415-0410-9bf9-f77b7e298cf2
* interface to libao2 changed ao_plugin addedanders2001-11-241-9/+17
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3096 b3059339-0415-0410-9bf9-f77b7e298cf2
* ao_mpegpesarpi2001-11-051-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2709 b3059339-0415-0410-9bf9-f77b7e298cf2
* ao_subdevice implementedal3x2001-06-211-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1186 b3059339-0415-0410-9bf9-f77b7e298cf2
* audio_out_format_name prototype added, ao_control_vol_t for ↵al3x2001-06-141-32/+11
| | | | | | aocontrol_get/set_volume added git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1128 b3059339-0415-0410-9bf9-f77b7e298cf2
* uj aocontrol valtozokal3x2001-06-071-3/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1049 b3059339-0415-0410-9bf9-f77b7e298cf2
* applied solaris8/netbsd/other fixes patch by Jürgen Keil <jk@tools.de>arpi_esp2001-06-051-0/+8
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1039 b3059339-0415-0410-9bf9-f77b7e298cf2
* audio out driversarpi_esp2001-06-021-0/+68
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@955 b3059339-0415-0410-9bf9-f77b7e298cf2