summaryrefslogtreecommitdiffstats
path: root/libao2
Commit message (Collapse)AuthorAgeFilesLines
* ao_openal: allow setting the OpenAL sub-devicewm42012-03-171-2/+28
| | | | | | | | Now "-ao openal:device=<subdevice>" will pass <subdevice> as device to OpenAL. This allows selecting both the OpenAL backend (OS-level audio API) and the physical output device. The available devices can be listed with "-ao openal:device=help".
* ao_dsound: fix volume controlswm42012-03-171-5/+7
| | | | | | | | | | | | The recent changes in mixer.c require the AO to return a volume of exactly 0 when audio has been muted. Rather than adding just another special case to mixer.c, fix ao_dsound.c to return previously set volumes exactly. Because DirectSound volume control is not connected with the system mixer, which could change the volume without mplayer knowing, reading the volume back from DirectSound is pointless. Also, the code tried to calculate log10(0). Clip the volume to 1, which results in -10000, DirectSound's definition of silence.
* ao_dsound: don't repeat parts of the audio buffer when playback endswm42012-03-171-24/+34
| | | | | | | | | When layback of a file ends, the audio output doesn't receive new audio data, but the rest of the data must be played properly. ao_dsound.c doesn't handle this properly: DirectSound will continue to play the ringbuffer, even if mplayer doesn't write any data. There's no explicit way to prevent such a buffer underrun. Try to detect it and stop playback.
* Merge remote-tracking branch 'origin/master' into my_masterwm42012-03-161-2/+4
|\ | | | | | | | | | | | | | | Conflicts: command.c mp_core.h mplayer.c screenshot.c
| * cleanup: Silence compilation warnings on MinGW-w64wm42012-03-011-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of the code, especially the dshow and windows codec loader parts, are extremely hacky and likely full of bugs. The goal is merely getting rid of warnings that could obscure more important warnings and actual bugs, instead of fixing actual problems. This reduces the number of warnings from over 500 to almost the same as when compiling on Linux. Note that many problems stem from using the ancient wine-derived windows headers. There are some differences to the "proper" windows header. Changing the code to compile with the proper headers would be too much trouble, and it still has to work on Unix. Some of the changes might actually break compilation on legacy MinGW, but we don't support that anymore. Always use MinGW-w64, even when compiling to 32 bit. Fixes some warnings in the win32 loader code on Linux too.
* | Merge remote-tracking branch 'origin/master' into my_masterwm42012-03-053-408/+0
|\| | | | | | | | | | | Conflicts: mplayer.c screenshot.c
| * configure, ao_alsa: drop support for obsolete ALSA versionsUoti Urpala2012-02-273-408/+0
| | | | | | | | | | Drop compatibility code for ALSA versions prior to 1.0.9. Change the configure check to use pkg-config only.
* | Merge branch 'softvol' into my_masterwm42012-01-189-45/+109
|\ \ | |/ |/|
| * ao_coreaudio: fix partial volume controlwm42012-01-181-1/+5
| | | | | | | | | | | | | | | | | | | | If digital pass-through is used, this supported setting the volume (just mute, actually), but not getting the volume. This will probably lead to a stuck mute state in the mplayer frontend. Make the code respond to volume queries even if digital pass-through is used. Ideally, ao_coreaudio should implement full mute control, but I can't even test on OSX.
| * ao_pulse: add mute controlwm42012-01-181-18/+37
| |
| * ao_alsa: add mute controlwm42012-01-181-23/+43
| |
| * ao_alsa: use "Master" mixer channel instead of "PCM" by defaultwm42012-01-181-1/+1
| | | | | | | | | | | | | | Do this, because the "Master" channel normally provides proper mute control. The old default can be forced with: --mixer-channel=PCM
| * 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
| * libao2: try to identify some audio outputs that have persistent volumewm42012-01-185-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | The mplayer frontend (specifically, mixer.c) needs to know this. If the audio output doesn't remember the volume across reinitialization, the frontend will restore the volume settings. There is also the assumption that the volume setting isn't global in this case (i.e. changing it won't change the volume of other applications or annoy the user otherwise). None of these changes have been tested. I'm guessing that ESD and NAS do per-connection non-persistent volume settings.
| * ao_coreaudio: signal that volume controls are not persistentwm42012-01-181-0/+2
| | | | | | | | | | This will make the mplayer frontend restore the volume on its own when the audio device is reinitialized.
| * 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: change default preference order of AO driverswm42012-01-161-8/+8
|/ | | | | | | | | | | | | | | Now PulseAudio is preferred over ALSA, which in turn is preferred over OSS. This should give best results on all systems. On systems with PulseAudio, we will always use it natively, rather than through the suboptimal ALSA emulation (which the default ALSA output is normally redirected to when PulseAudio is active; ALSA hardware devices will not be, but to use those the user must set AO explicitly in any case, so changing the defaults makes no difference). The fallback from ao_pulse to ao_alsa causes no noticeable delay on systems without PulseAudio. On systems with ALSA, we won't attempt to use OSS anymore. Also, move OpenAL above SDL. OpenAL should generally work better than SDL.
* ao_coreaudio: fix crash when using mute with S/PDIF outputreimar2011-11-251-1/+4
| | | | | | | | | | RenderCallbackSPDIF might call read_buffer with NULL data. The purpose is to drain data from the buffer when the output is muted. Add a check to call av_fifo_drain() in this case. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34241 b3059339-0415-0410-9bf9-f77b7e298cf2 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34242 b3059339-0415-0410-9bf9-f77b7e298cf2
* ao_coreaudio: fix S/PDIF output on OS X 10.7Zongyao Qu2011-11-251-37/+50
|
* ao_pcm: fix pointless message due to uninitialize variableUoti Urpala2011-08-111-1/+1
| | | | | | The variable corresponding to the "fast" suboption of ao_pcm was uninitialized. Fix. The only effect was possibly printing a warning about the suboption being deprecated even if it wasn't used.
* audio: export audio pts to AO driversUoti Urpala2011-07-314-11/+12
| | | | | 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-022-0/+10
| | | | | | | | | | | | 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.
* Windows: ao_pcm: add io.h include for MinGW64diego2011-06-291-0/+1
| | | | | | | | On MinGW64 io.h is needed for _get_osfhandle(). patch by Stephen Sheldon, sfsheldo gmail com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33341 b3059339-0415-0410-9bf9-f77b7e298cf2
* ao_rsound: add new RSound audio output driverHans-Kristian Arntzen2011-06-262-0/+218
|
* cleanup: ao_pcm: remove useless assignment to ao->buffersizeUoti Urpala2011-06-261-1/+0
|
* ao: fix crash after ao init failure (from recent 3a5fd15fa2)Uoti Urpala2011-05-161-1/+3
| | | | | | | | If opening an audio output driver using the old API failed the "global_ao" variable was not set back to NULL as it should have been. This caused an assert failure the next time there was an attempt to open such an AO (either due to fallback to another AO after the failure or after moving to another file). Fix.
* ao_pcm, core: use new API in ao_pcm, change timing with itUoti Urpala2011-05-053-138/+125
| | | | | | | | | | | | | | | | | 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.
* ao_null: convert to new API, cleanup/rewriteUoti Urpala2011-05-051-74/+70
|
* audio output: add a new AO driver APIUoti Urpala2011-05-053-69/+169
| | | | | | | 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-042-65/+61
| | | | | | 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.
* cleanup: avoid various GCC warningsClément Bœsch2011-04-201-1/+1
|
* ao_alsa: remove warning by simplifying error handling caseClément Bœsch2011-04-201-4/+4
| | | | | Avoid a gcc warning about potentially uninitialized variable 'err' (there was no actual problem with the code).
* audio: change external AO interface to "ao_[method](ao, ...)"Uoti Urpala2011-04-093-46/+127
| | | | | | | | 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.
* vo_dxr2, ao_dxr2: drop dxr2 supportUoti Urpala2011-01-312-225/+0
| | | | | | dxr2 support had been broken quite a while and nobody noticed. There were finally commits to fix it in the svn repo, but rather than apply those I'll just drop dxr2 support.
* ao_coreaudio: fix compilation on OS X 10.4.diego2011-01-311-0/+15
| | | | | | | | | This version is the last OS version available for certain classes of PPC Macs, but it lacks AudioDeviceIOProcID, so it has to be emulated. patch by Aaro Koskinen, aaro.koskinen iki fi git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32770 b3059339-0415-0410-9bf9-f77b7e298cf2
* ao_pcm: change message to mention "-novideo" instead of "-vc null"Uoti Urpala2010-12-081-1/+1
| | | | | | | | | -novideo is the right way to disable video, and should also work in more cases now that lavf is used as the default demuxer for more formats (like AVI; internal AVI demuxer fails with -novideo). Also change the man page description of -novideo a bit to make it sound less negative about the chances of the option working.
* cleanup: remove NULL checks before free() all over the codecboesch2010-11-144-14/+9
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32624 b3059339-0415-0410-9bf9-f77b7e298cf2
* ao_sun: Add support for AOPLAY_FINAL_CHUNKreimar2010-11-021-3/+5
| | | | | | | | | | | Reportedly this also fixes a possible hang at the end of playback (shouldn't happen unless delay reporting is broken too). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32509 b3059339-0415-0410-9bf9-f77b7e298cf2 Reindent. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32510 b3059339-0415-0410-9bf9-f77b7e298cf2
* ao_coreaudio: byteswap AC-3 streams on little-endiandiego2010-11-021-0/+4
| | | | | | patch by Sean McGovern, gseanmcg gmail com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32450 b3059339-0415-0410-9bf9-f77b7e298cf2
* vo_ivtv; Move ivtv_fd extern variable declaration to vo_ivtv.hdiego2010-11-021-2/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32159 b3059339-0415-0410-9bf9-f77b7e298cf2
* vo_v4l2: Move v4l2_fd extern declaration to vo_v4l2.hdiego2010-11-021-2/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32158 b3059339-0415-0410-9bf9-f77b7e298cf2
* ao_mpegpes,vo_mpegpes: Rename vo_mpegpes_fd2 variable to ao_mpegpes_fddiego2010-11-021-22/+22
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32154 b3059339-0415-0410-9bf9-f77b7e298cf2
* ao_coreaudio: fix grammar/spelling in mp_msg callsdiego2010-11-021-11/+19
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31972 b3059339-0415-0410-9bf9-f77b7e298cf2
* spelling fixessiretart2010-11-021-1/+1
| | | | | | | | | | Found by the Debian QA tool 'lintian' git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31913 b3059339-0415-0410-9bf9-f77b7e298cf2 reintroduce typo in genres.h that was fixed fixed r31913 to match the id3v2 spec git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31920 b3059339-0415-0410-9bf9-f77b7e298cf2
* ao_mpegpes: Properly close file on error or uninitreimar2010-11-021-5/+11
| | | | | | | Avoids failing with "device busy" e.g. when reinitializing the ao. Fixes bug #1746. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31871 b3059339-0415-0410-9bf9-f77b7e298cf2
* ao_mpegpes.c: minor simplificationreimar2010-11-021-1/+1
| | | | | | | Avoid code duplication, use the generated file name instead of generating it twice. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31870 b3059339-0415-0410-9bf9-f77b7e298cf2
* ao_coreaudio: Improve handling of the "help" suboptionadrian2010-11-021-4/+6
| | | | | | | | | | Avoid flagging it as an error and continue intialization if it is selected. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31725 b3059339-0415-0410-9bf9-f77b7e298cf2 Reindent and align after r31725. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31726 b3059339-0415-0410-9bf9-f77b7e298cf2
* ao_coreaudio: Remove some unused variablesdiego2010-11-021-5/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31723 b3059339-0415-0410-9bf9-f77b7e298cf2
* ao_coreaudio: Process the CoreFoundation runloopadrian2010-11-021-0/+6
| | | | | | | Process it in case the vo doesn't do that, e.g. when vo_corevideo is used with shared_buffer. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31717 b3059339-0415-0410-9bf9-f77b7e298cf2
* ao_coreaudio: Refactor device selectionadrian2010-11-021-22/+91
| | | | | | | | | | | Add output device selection and correctly set the default device if it's selected. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31715 b3059339-0415-0410-9bf9-f77b7e298cf2 Fix cosmetics after r31715. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31716 b3059339-0415-0410-9bf9-f77b7e298cf2
* ao_coreaudio: use same types as coreaudio APIadrian2010-11-021-3/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31714 b3059339-0415-0410-9bf9-f77b7e298cf2
* ao_coreaudio: replace deprecated functions with OSX 10.4 onesadrian2010-11-021-207/+236
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31713 b3059339-0415-0410-9bf9-f77b7e298cf2
* ao_coreaudio: Fix printf specifiersadrian2010-11-021-2/+2
| | | | | | | Fixes warnings: libao2/ao_coreaudio.c:203: warning: format '%lu' expects type 'long unsigned int', but argument n has type 'UInt32' git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31712 b3059339-0415-0410-9bf9-f77b7e298cf2
* ao_pcm: Remove some disabled and pointless codereimar2010-11-021-12/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31686 b3059339-0415-0410-9bf9-f77b7e298cf2
* ao_ivtv: Add header for ivtv_write() instead of forward declaring itdiego2010-11-021-2/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31419 b3059339-0415-0410-9bf9-f77b7e298cf2
* ao_jack: increase maximum allowed channels from 6 to 8.tack2010-11-021-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31358 b3059339-0415-0410-9bf9-f77b7e298cf2
* Merge svn changes up to r31189Uoti Urpala2010-05-301-2/+4
|\
| * Change WAV header updating in ao_pcm to allow to up to almost 4GB size.reimar2010-05-211-2/+4
| | | | | | | | | | | | | | Patch by Rob McMullen [robm users sourceforge net] git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31189 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30907Uoti Urpala2010-04-261-0/+1
|\|
| * Include libavutil/avutil.h for FFMINkomh2010-03-101-0/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30881 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Delete things related to old translation systemUoti Urpala2010-03-1016-16/+0
| | | | | | |