summaryrefslogtreecommitdiffstats
path: root/libao2/ao_oss.c
Commit message (Collapse)AuthorAgeFilesLines
* Rename directories, move files (step 1 of 2) (does not compile)wm42012-11-121-560/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* ao_oss: make error check slightly more correctreimar2012-10-311-1/+1
| | | | | | | | | | Only a return value of -1 indicates an error for open(), purely theoretically the mixer device could get 0 assigned as file descriptor. Even more theoretically, WinCE uses descriptors with values < 0, though that probably is non-conformant behaviour. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35295 b3059339-0415-0410-9bf9-f77b7e298cf2
* Rename to "mpv"wm42012-10-121-1/+1
| | | | | | | | | | | | | | | | | | This changes the name of this project to mpv. Most user-visible mentions of "MPlayer" and "mplayer" are changed to "mpv". The binary name and the default config file location are changed as well. The new default config file location is: ~/.mpv/ Remove etc/mplayer.desktop. Apparently this was for the MPlayer GUI, which has been removed from mplayer2 ages ago. We don't have a logo, and the MS Windows resource files sort-of require one, so leave etc/mplayer.ico/.xpm as-is. Remove the debian and rpm packaging scripts. These contained outdated dependencies and likely were more harmful than useful. (Patches which add working and well-tested packaging are welcome.)
* libaf: rename af_format.h to format.hwm42012-08-291-1/+1
| | | | | | | | | | af_format.h declares some symbols which are defined in format.c. The fact that af_format.c is a completely unrelated file is rather confusing. Having the header and implementation file use the same base name is more uniform. (af_format.c is the audio conversion filter, while af_format.h and format.c are about audio formats and their properties.) Also fix all source files which include this file.
* Change <endian.h> include to <sys/types.h>wm42012-07-311-1/+0
| | | | | This seems to be more portable. Should fix compilation on OSX and FreeBSD. Apparently also works on MinGW-w64.
* Remove compile time/runtime CPU detection, and drop some platformswm42012-07-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mplayer had three ways of enabling CPU specific assembler routines: a) Enable them at compile time; crash if the CPU can't handle it. b) Enable them at compile time, but let the configure script detect your CPU. Your binary will only crash if you try to run it on a different system that has less features than yours. This was the default, I think. c) Runtime detection. The implementation of b) and c) suck. a) is not really feasible (it sucks for users). Remove all code related to this, and use libav's CPU detection instead. Now the configure script will always enable CPU specific features, and disable them at runtime if libav reports them not as available. One implication is that now the compiler is always expected to handle SSE (etc.) inline assembly at runtime, unless it's explicitly disabled. Only checks for x86 CPU specific features are kept, the rest is either unused or barely used. Get rid of all the dump -mpcu, -march etc. flags. Trust the compiler to select decent settings. Get rid of support for the following operating systems: - BSD/OS (some ancient BSD fork) - QNX (don't care) - BeOS (dead, Haiku support is still welcome) - AIX (don't care) - HP-UX (don't care) - OS/2 (dead, actual support has been removed a while ago) Remove the configure code for detecting the endianness. Instead, use the standard header <endian.h>, which can be used if _GNU_SOURCE or _BSD_SOURCE is defined. (Maybe these changes should have been in a separate commit.) Since this is a quite violent code removal orgy, and I'm testing only on x86 32 bit Linux, expect regressions.
* libao2: change control() types to enum, remove unused onesUoti Urpala2012-04-081-16/+0
| | | | | | | | | Change the audio driver control() command argument from "int" to "enum aocontrol". Remove unused control types (SET_DEVICE, GET_DEVICE, QUERY_FORMAT, SET_PLUGIN_DRIVER, SET_PLUGIN_LIST). The QUERY_FORMAT one looks like there's a possibility such functionality could be useful in the future, but as ao_oss was the only driver to have an actual implementation of it, the current code wasn't worth keeping.
* Delete things related to old translation systemUoti Urpala2010-03-101-1/+0
| | | | | Remove the help/ subdirectory, configure code to create toplevel help_mp.h, and all the '#include "help_mp.h"' lines from .c files.
* Restore collapsed whitespace in output messagesUoti Urpala2010-03-071-1/+1
| | | | | | | | | For some reason commit e306174952d42e1cd6cc5efc50ae6bb0410501bc, which replaced translation macro names with the corresponding English strings, also collapsed multiple consecutive space characters into one. Change most of these back. In a couple of cases the amount of whitespace is important for alignment, and for the rest it at least keeps the strings closer to the existing translations.
* Merge svn changes up to r30301Uoti Urpala2010-01-251-7/+9
|\
| * Add support for distinguishing between little- and big-endian SPDIF AC3reimar2010-01-111-2/+4
| | | | | | | | | | | | | | and converting between both. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30283 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Use AF_FORMAT_IS_AC3 in ao_oss.creimar2010-01-111-5/+5
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30281 b3059339-0415-0410-9bf9-f77b7e298cf2
* | audio: Remove fixed decode_audio() return size limit (MAX_OUTBURST)Uoti Urpala2009-12-291-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | A couple of months ago MPlayer's ALSA driver started rounding the amount of input data it was willing to accept in one call down to an integer multiple of the value it set in ao_data.outburst. In some configurations it was possible for this value to exceed the 64 KiB limit on the amount MPlayer was willing to write in a single call to the AO. As a result ao_alsa accepted 0 bytes in each play() call and audio playback failed. Fix this by removing the fixed 64 KiB limit on the amount of audio sent to AO at once; the limit was mostly a remnant of older code anyway.
* | Merge svn changes up to r29752Uoti Urpala2009-10-061-1/+12
|\| | | | | | | | | | | | | | | | | As part of merging subtitle-in-terminal changes make update_subtitles() only clear existing subtitles if called with the reset argument, and not try to set new ones. Later calls should set the needed new subtitles, and this change avoids some problems with trying to set subtitles when mp_property_sub() in command.c gets called from initialization code before full initialization.
| * fix calculation of ao_data.bps for sample formats with more than 16 bitscladisch2009-10-051-1/+12
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29750 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r29455Uoti Urpala2009-07-291-23/+5
|\|
| * Replace WORDS_BIGENDIAN by HAVE_BIGENDIAN in all internal code.diego2009-07-261-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29443 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Use the correct OSS format, where possible, for mplayer's packed 24-bitcladisch2009-07-241-22/+4
| | | | | | | | | | | | format (AFMT_x24_xE would be 32-bit aligned). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29438 b3059339-0415-0410-9bf9-f77b7e298cf2
| * whitespace cosmetics: Remove all trailing whitespace.diego2009-05-131-9/+9
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29305 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Remove trailing whitespace from most filesUoti Urpala2009-07-071-9/+9
| |
* | Translation system changes part 2: replace macros by stringsAmar Takhar2009-07-071-12/+12
| | | | | | | | | | Replace all MSGTR_ macros in the source by the corresponding English string.
* | Translation system changes part 1: wrap translated stringsAmar Takhar2009-07-071-12/+12
| | | | | | | | | | Replace mp_msg() calls which have a translated string as the format argument with mp_tmsg and add _() around all other translated strings.
* | Add OSS4 vmix volume control to ao_ossGrigori Goronzy2009-06-241-0/+29
|/ | | | | | Support for per-application volume control, introduced by OSS4. This adds a check in configure to add the proper include path to the CFLAGS, if needed. The path is taken from /etc/oss.conf.
* 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
* Set samplerate in reset also for AC3, and set it before the format in thatreimar2009-02-171-0/+2
| | | | | | | 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
* 100l, do 0-filling on resume (to avoid desync after pause) in ao_oss only whenreimar2009-02-161-1/+1
| | | | | | | 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
* Add standard license headers.diego2009-01-261-0/+20
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28378 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix 'cast from pointer to integer of different size' on 64bit architectures. ↵ranma2008-08-241-1/+1
| | | | | | 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
* Somewhat hackish fix for A-V desync with ao_oss and frame stepping:reimar2007-07-191-0/+9
| | | | | | | send 0-samples according to the amount of data lost during pause. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23829 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove a disabled and completely outdated sample rate mismatch warning.reimar2006-12-101-4/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21563 b3059339-0415-0410-9bf9-f77b7e298cf2
* two variables are made static, one of them additionaly modified to const ↵reynaldo2006-07-091-2/+2
| | | | | | char*. Patch by Stefan Huehner, stefan AT huehner-org git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18971 b3059339-0415-0410-9bf9-f77b7e298cf2
* Respect AOPLAY_FINAL_CHUNKpacman2006-06-281-2/+7
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18846 b3059339-0415-0410-9bf9-f77b7e298cf2
* Part1 of several printf2mp_msg changes in patch from Otvos Attila oattila AT ↵reynaldo2006-03-301-1/+1
| | | | | | chello DOT hu git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17995 b3059339-0415-0410-9bf9-f77b7e298cf2
* Patch by Stefan Huehner / stefan % huehner ! org \rathann2006-02-091-5/+5
| | | | | | | | | | | | | | | | | | | | | | 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
* -aop is long obsolete.diego2005-11-281-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17059 b3059339-0415-0410-9bf9-f77b7e298cf2
* Unify include paths, -I.. is in CFLAGS.diego2005-11-191-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17021 b3059339-0415-0410-9bf9-f77b7e298cf2
* Allow setting the mixer per instance so one can fallback betweenalbeu2005-11-101-11/+25
| | | | | | | | | several oos device and still have correct mixer settings all the time. The sytax is now: oss[:dsp_device[:mixer_device[:mixer_channel]]] git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16960 b3059339-0415-0410-9bf9-f77b7e298cf2
* QUERY_FORMAT supportalex2005-07-031-1/+9
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15899 b3059339-0415-0410-9bf9-f77b7e298cf2
* Have OSS audio out fall back to s16ne instead of u8 if it can't open theivo2005-02-261-2/+3
| | | | | | | soundcard for 3+ channels and do it for all audio streams (not only AC3). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14835 b3059339-0415-0410-9bf9-f77b7e298cf2
* print "Unknown/not supported internal format" message only with -v as itreimar2005-01-291-1/+1
| | | | | | | is not an error. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14610 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use AF_FORMAT_S16_NE instead of #ifdef WORDS_BIGENDIAN ...reimar2005-01-061-7/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14405 b3059339-0415-0410-9bf9-f77b7e298cf2
* Check for every 24 and 32 bit AFMT_ separately if it is defined.reimar2005-01-061-4/+28
| | | | | | | Patch by Walter Haidinger walter dot haidinger at gmx dot at git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14398 b3059339-0415-0410-9bf9-f77b7e298cf2
* more verbose messagesalex2004-12-291-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14274 b3059339-0415-0410-9bf9-f77b7e298cf2
* af_fmt2str_shortalex2004-12-281-4/+5
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14265 b3059339-0415-0410-9bf9-f77b7e298cf2
* 100l set default format for AF_FORMATs not supported by sound cardrtognimp2004-12-281-3/+9
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14261 b3059339-0415-0410-9bf9-f77b7e298cf2
* removing AFMT_ dependancyalex2004-12-271-17/+114
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14246 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make include paths consistent.diego2004-12-071-4/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14124 b3059339-0415-0410-9bf9-f77b7e298cf2
* mp_msg transition of unmaintained audio output drivers.ivo2004-09-181-12/+12
| | | | | | | Patch by Reynaldo H. Verdejo Pinochet <reynaldo at opendot dot cl> git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13384 b3059339-0415-0410-9bf9-f77b7e298cf2
* ok this one is beyond stupid. the code didn't even do what was intendedrfelker2004-05-011-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12384 b3059339-0415-0410-9bf9-f77b7e298cf2
* uninit immed flagalex2004-04-061-4/+10
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12146 b3059339-0415-0410-9bf9-f77b7e298cf2
* add option to select mixer channelattila2004-01-241-3/+36
| | | | | | | patch by Catalin Muresan <catalin.muresan@astral.ro> git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@11838 b3059339-0415-0410-9bf9-f77b7e298cf2
* Set close-on-exec after newer open (in reset func). Patch by Andriy Gapon ↵alex2003-08-131-0/+4
| | | | | | <agapon@cv-nj.com> git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10601 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
* nice 10l bug, found by Balatoni Denes <pnis@coder.hu>arpi2003-01-281-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9142 b3059339-0415-0410-9bf9-f77b7e298cf2
* 10larpi2003-01-091-2/+1
| | | | | | | noticed by Joe Barnett <sanchezthecactus@yahoo.com> git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8849 b3059339-0415-0410-9bf9-f77b7e298cf2
* ao_oss was not using the channel & format returned by the soundcardarpi2002-12-281-5/+5
| | | | | | | | | | for ao_data.bps calcualtion - hence fscked up av sync if soundcard didn't support a number of channels or audio format. patch by Balatoni Denes <pnis@coder.hu> git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8604 b3059339-0415-0410-9bf9-f77b7e298cf2
* 1l, opposite meaning of what's intended!rfelker2002-11-281-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8305 b3059339-0415-0410-9bf9-f77b7e298cf2
* avoid giving a /dev/dsp fd to child processes!!rfelker2002-11-281-0/+4
| | | | | | | | (menu exec, xscreensaver nonsense, etc) other parts of mplayer should be fixed like this as well! git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8304 b3059339-0415-0410-9bf9-f77b7e298cf2
* verbose can be negativearpi2002-11-011-2/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8028 b3059339-0415-0410-9bf9-f77b7e298cf2
* remove nonsense warnings now that libaf is usedrfelker2002-10-081-0/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7669 b3059339-0415-0410-9bf9-f77b7e298cf2
* tons of warning fixes, also some 10l bugfixes, including Dominik's PVA bugarpi2002-09-221-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7473 b3059339-0415-0410-9bf9-f77b7e298cf2
* release /dev/dsp on pause patch by Eric Lammerts <eric@lammerts.org> (and D ↵alex2002-08-281-2/+4
| | | |