1
mirror of https://github.com/mpv-player/mpv synced 2024-07-31 16:29:58 +02:00
Commit Graph

32 Commits

Author SHA1 Message Date
wm4
c48c0f453b ao_dsound: fix volume controls
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.
2012-03-17 21:06:30 +01:00
wm4
2f9b14916f ao_dsound: don't repeat parts of the audio buffer when playback ends
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.
2012-03-17 21:06:30 +01:00
wm4
6de8120822 Merge remote-tracking branch 'origin/master' into my_master
Conflicts:
	command.c
	mp_core.h
	mplayer.c
	screenshot.c
2012-03-16 19:14:44 +01:00
wm4
24be34f1e9 cleanup: Silence compilation warnings on MinGW-w64
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.
2012-03-01 00:22:30 +02:00
wm4
56c1ab1c62 libao2: try to identify some audio outputs that have persistent volume
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.
2012-01-18 04:21:46 +01:00
diego
d306b727b1 Remove pointless '#if 1' preprocessor directives.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30654 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-19 10:22:29 +00:00
reimar
33bc71f10d Add support for distinguishing between little- and big-endian SPDIF AC3
and converting between both.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30283 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-11 20:27:52 +00:00
reimar
d3ae3611ce More uses of AF_FORMAT_IS_AC3
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30282 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-11 20:02:46 +00:00
tack
3c2afd6786 Add support for 8 channel audio.
Where 8 channel support is non-trivial (e.g. ao_dsound), at least ensure we
fail gracefully.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29868 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-11-10 00:45:19 +00:00
reimar
790e41cf8f The suboption parser now takes a const options list, so mark them all const.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29628 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-09-02 11:33:37 +00:00
diego
6e9cbdc104 whitespace cosmetics: Remove all trailing whitespace.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29305 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-05-13 02:58:57 +00:00
reimar
d6bf2e318e Make ao_info_t structs const.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28858 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-06 19:43:12 +00:00
reimar
7c52124a2b The 8 bit per sample formats are unsigned on Windows, fixes playback with
-af format=s8 for -ao dsound and -ao win32.
Patch by Zhou Zongyi [zhouzongyi (at) pset suntec net]


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28850 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-06 13:22:48 +00:00
diego
b10c35e0ed Use standard license headers with standard formatting.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26775 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-05-14 18:02:27 +00:00
reimar
5d02058b47 Do not use fast_memcpy for small size copy, esp. when the size is constant
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23476 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-06-05 15:09:49 +00:00
reimar
6a09e8e2ed Replace implicit use of fast_memcpy via macro by explicit use to allow
for future optimization.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23475 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-06-05 14:27:54 +00:00
reimar
40f9cdbdd8 Implement AOPLAY_FINAL_CHUNK support for dshow and win32 out.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20256 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-10-15 20:48:26 +00:00
diego
66b1d0d001 The FSF changed postal address.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19620 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-09-01 12:11:11 +00:00
reynaldo
f50e7ffca9 modifies function declarations without parameters from ()
to the correct (void). Only files in libao2 are affected.

patch by Stefan Huehner stefan AT huehner-org>


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18920 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-07-06 04:30:19 +00:00
joey
35d0962444 DirectSound's GetVolume and SetVolume use 100ths of decibels and range from -10,000 to 0.
MPlayer uses a linear intensity value between 0.0 and 100.0.
This patch converts the values properly rather than simply linearly mapping the range.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16973 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-11-11 03:07:01 +00:00
faust3
a8941ce3eb get_space fix by Florian Dietrich <flodt8 at yahoo.de>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14948 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-03-15 16:29:18 +00:00
faust3
4643b6100a support immed flag, always initialize write_offset, min_free_space doesn't seem to be required anymore after Florian Dietrichs patches
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14556 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-01-21 13:22:59 +00:00
reimar
fa8c50d4cf af_format.h needs config.h to be included first.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14480 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-01-12 22:00:02 +00:00
faust3
5817da7f59 device selection support
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14399 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-01-06 13:31:02 +00:00
alex
14a29762f2 af_fmt2str_short
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14265 b3059339-0415-0410-9bf9-f77b7e298cf2
2004-12-28 19:11:14 +00:00
alex
4d7d3bf2c0 hopefully final fix
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14250 b3059339-0415-0410-9bf9-f77b7e298cf2
2004-12-27 18:10:30 +00:00
alex
507121f7fe removing AFMT_ dependancy
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14246 b3059339-0415-0410-9bf9-f77b7e298cf2
2004-12-27 17:30:15 +00:00
faust3
ecb5105a2c disable all unknown formats in the windows aos
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14136 b3059339-0415-0410-9bf9-f77b7e298cf2
2004-12-08 09:52:55 +00:00
diego
67a1fd4053 Make include paths consistent.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14124 b3059339-0415-0410-9bf9-f77b7e298cf2
2004-12-07 02:24:15 +00:00
faust3
ae746ad8e8 channel reorder patch by Florian Dietrich <flodt8 at yahoo.de>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13675 b3059339-0415-0410-9bf9-f77b7e298cf2
2004-10-18 19:23:13 +00:00
faust3
e652c2fe8a ao dsound improvements patch by Florian Dietrich <flodt8 at yahoo.de>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13641 b3059339-0415-0410-9bf9-f77b7e298cf2
2004-10-14 13:03:03 +00:00
faust3
b8c0aed043 directsound audio output plugin, patch by Gabor Szecsi <deje at miki.hu> some minor modifications by me
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13461 b3059339-0415-0410-9bf9-f77b7e298cf2
2004-09-25 15:34:42 +00:00