Commit Graph

667 Commits

Author SHA1 Message Date
reimar dbe4e49033 Add a hack to detect when we are writing into a Windows pipe since the fseek
incorrectly does not fail like it should.
This ensures we will not incorrectly append the file header at the end.
Based on patch by Zhou Zongyi [zhouzongyi at pset.suntec.net]


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29311 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-05-16 13:59:53 +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
diego d9ded9284c Add missing 'void' to parameterless function declarations.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29254 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-05-04 17:35:26 +00:00
diego e3ec5b1fd3 Rename macosx audio output driver to coreaudio.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29251 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-05-04 14:53:47 +00:00
reimar 1ba8ea2d34 Use libavutil/fifo.h for macosx ao instead of its own FIFO implementation.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29243 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-05-03 20:57:37 +00:00
reimar 690714883e Simplify: use av_fifo_space
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29166 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-04-10 14:41:18 +00:00
reimar fe9c8d60b4 Disable pause-hack from PulseAudio 0.9.15 on, it should be fixed.
Patch Lennart Poettering [lennart poettering net] with documentation
update by me.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29160 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-04-09 20:20:00 +00:00
reimar 33645075f1 Split oversized of "argument" onto a separate line.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29159 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-04-09 20:10:35 +00:00
reimar d1c4d6c7ef Also lock the mainloop when doing adjusting the volume for PulseAudio.
Patch by Lennart Poettering [lennart poettering net]


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29158 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-04-09 20:07:26 +00:00
reimar a7e4ab04d7 Make sure waitop always unlocks the mainloop even if the operation could not
be created.
Patch by Lennart Poettering [lennart poettering net]


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29157 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-04-09 20:04:24 +00:00
reimar 45535aa89d Add forgotten "static" to new data_length variable in ao_pcm
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29037 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-22 14:28:13 +00:00
reimar 0d44f19d27 Whitespace-only cosmetics: use consistent indentation in ao_pcm.c
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29036 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-22 14:27:10 +00:00
reimar 412cddeb2c Print a warning if ao_pcm wrote more data than what can be specified in the
WAV header (ca. 2GB currently) or if it can not update the header at all.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29035 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-22 14:23:07 +00:00
reimar 2c64a71a29 Do not call waveOutReset in uninit if you should wait till playing finishes,
and retry waveOutClose if it fails due to still playing.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28918 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-09 19:15:20 +00:00
reimar 2853105459 Reuse libavutil fifo code instead of reimplementing it over and over.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28917 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-09 18:21:47 +00:00
reimar 54c1d83197 Make audio_out_* structs const so they end up in .rodata
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28859 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-06 19:58:16 +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 77e48c6635 Use code that is actually thread-safe to calculate delay, free space etc. in ao_win32
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28857 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-06 19:23:24 +00:00
reimar c73340f19a Cosmetics: get rid of trailing whitespace.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28856 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-06 19:10:54 +00:00
reimar 6067203cab get rid of full_buffers variable, if the check it is used for is triggered
something is seriously wrong and the ao will not work right anyway.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28855 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-06 19:07:50 +00:00
reimar 6040a6f3ea Remove now unused buf_write_pos variable from ao_win32
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28854 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-06 18:53:29 +00:00
reimar 7ee7bd3d5b Always write full buffers in ao_win32, except for the last block.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28853 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-06 18:50:50 +00:00
reimar 79df4b2499 Use calloc instead of malloc+memset
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28852 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-06 16:27:31 +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
reimar 2f2b271649 Sleep based on get_delay in ao_win32 uninit instead of a loop.
The loop for an unknown reason could rarely cause an endless loop.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28828 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-05 22:07:06 +00:00
reimar 8831008bb5 full_buffers and buffered_bytes must be volatile because they are used from
different threads, hopefully this fixes an uninit hang.
The code still relies on luck for thread-safety though.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28811 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-05 12:25:10 +00:00
diego 23599b030c DART audio output driver for OS/2 by KO Myung-Hun, komh chollian net
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28775 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-01 11:36:39 +00:00
reimar 0ef6b6a546 Move resetting audio_info_t samples, eof and error in ao_sun.c to reset(), avoids
duplication code from init() and fixes hangs after seeking.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28689 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-02-21 13:37:47 +00:00
reimar 0927ebeef7 Work around a PulseAudio bug that causes MPlayer to hang after unpausing.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28668 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-02-19 14:00:33 +00:00
reimar 0c6b3b8742 Set samplerate in reset also for AC3, and set it before the format in that
case (no idea why, but it is done this way in init, so it is consistent).


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28640 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-02-17 21:08:22 +00:00
reimar 8e90297698 100l, do 0-filling on resume (to avoid desync after pause) in ao_oss only when
the we output a PCM format, not for e.g. AC3.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28614 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-02-16 18:38:54 +00:00
diego 390a1afef0 1) HAVE_SYS_ASOUNDLIB_H/HAVE_ALSA_ASOUNDLIB_H are defined to 0/1,
not defined/undefined, use them accordingly.
2) Add ESD definitions to avoid undefined preprocessor directives warnings.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28397 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-01-30 23:21:23 +00:00
diego c1cd81818a Add standard license headers.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28378 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-01-26 15:06:44 +00:00
reimar 4b5c66af76 Replace deprecated jack_client_new with jack_client_open.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28241 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-01-04 11:51:11 +00:00
reimar d3825e4c8a Move several of the ao_nas int-to-string maps into .rodata
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28227 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-01-01 11:51:52 +00:00
reimar 6574e5da34 100l, reorder check for AC3 format to avoid a possible memleak
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28153 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-12-15 20:19:27 +00:00
diego 0864f92e7a Get rid of pointless 'extern' keywords.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28085 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-12-03 23:01:03 +00:00
diego 4d644f513c Replace preprocessor check for WIN32 with checks for __MINGW32__ and __CYGWIN__.
This avoids a pointless indirection that only obscures what is really done.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27761 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-10-13 16:23:55 +00:00
cehoyos 22bb046adc Replace numeric constants by their defines.
Fixes icc warning #188: enumerated type mixed with another type


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27738 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-10-09 17:08:47 +00:00
ranma cb8c70d6c2 Fix "format '%d' expects type 'int', but argument 6 has type 'size_t'" warning.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27714 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-10-04 15:11:39 +00:00
ranma 68fa9667ec Make alsa resume after suspend to disk (would say 'file descriptor is in bad state' before this change)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27712 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-10-04 15:03:10 +00:00
diego 3311a2ae9c Replace casual GPL notices by proper license headers.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27541 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-09-07 14:09:51 +00:00
diego 691a41a817 Replace casual GPL notice by proper license header.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27534 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-09-06 18:19:37 +00:00
ranma 4445a58fd3 Fix 'cast from pointer to integer of different size' on 64bit architectures. Casting to long should work for 32bit and 64bit and not make a difference to the boolean operation (since 'format' is always 32bit (int) the upper 32bit of 'arg' won't matter, but the compiler should be happy now. Casting both to unsigned makes sure the compiler isn't messing things up by sign-extending 'format' to 64bit before masking)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27482 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-08-24 13:52:54 +00:00
ranma 7f26ceaa54 Handle AOPLAY_FINAL_CHUNK
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27481 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-08-24 13:36:04 +00:00
ranma d5df440c7f fix compiler warnings
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27478 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-08-23 08:14:37 +00:00
diego 5a4496ca5d Work correctly with very small files where less than outburst is to be played.
patch by Tobias Diedrich, ranma tdiedrich de


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27467 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-08-15 17:14:53 +00:00
diego 511729a3a2 Use '#include <poll.h>' instead of '#include <sys/poll.h>'.
It is the standard location as defined by the Open Group.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27463 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-08-14 15:54:53 +00:00
diego 20e0b5c831 100l: Rename missed preprocessor directives from a HAVE_ prefix to CONFIG_.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27462 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-08-14 15:48:11 +00:00
diego 024b6efdf1 Introduce CONFIG_ALSA preprocessor directive for ALSA 0.9 and 1.x.
Use it in all the places that checked for either ALSA 0.9 or 1.x.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27422 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-08-06 23:19:29 +00:00