summaryrefslogtreecommitdiffstats
path: root/libao2/ao_alsa.c
Commit message (Collapse)AuthorAgeFilesLines
* Add workarounds for old prerelease versions of alsa-lib 0.9.0 that didcladisch2006-03-311-0/+6
| | | | | | | not allow reading the buffer boundary value. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18010 b3059339-0415-0410-9bf9-f77b7e298cf2
* To avoid a bug in ALSA's rate plugin that causes spurious overruns, trycladisch2006-03-131-0/+12
| | | | | | | to disable it so that mplayer's resampler is used. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17850 b3059339-0415-0410-9bf9-f77b7e298cf2
* Do not try to count hardware sound cards because there might be nonecladisch2006-03-131-8/+1
| | | | | | | when using a software plugin for JACK/OSS/Polypaudio/Bluetooth/etc. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17849 b3059339-0415-0410-9bf9-f77b7e298cf2
* Output error messages from the ALSA library through mp_msg() instead ofcladisch2006-02-271-0/+22
| | | | | | | the default stderr. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17692 b3059339-0415-0410-9bf9-f77b7e298cf2
* Show the actual ALSA version instead of the version mplayer was compiledcladisch2006-02-271-0/+4
| | | | | | | with, if possible. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17691 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix the error handling in the play() function: add a handler for EINTR,cladisch2006-02-131-24/+15
| | | | | | | | | improve the reporting of other errors, and don't try to call snd_pcm_writei() repeatedly when it aborts after a partial write due to an error. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17622 b3059339-0415-0410-9bf9-f77b7e298cf2
* This changes the software parameters to be more compatible with thecladisch2006-02-131-51/+45
| | | | | | | | behaviour of the OSS driver. This implies that underruns are not longer reported. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17621 b3059339-0415-0410-9bf9-f77b7e298cf2
* Using non-blocking writes makes sense when the program wants to do othercladisch2006-02-131-49/+5
| | | | | | | | | | | | things instead of waiting for the device to become ready. However, just calling snd_pcm_wait() is identical to blocking mode, so we can just as well remove support for non-blocking writes. Besides, the waiting code was never actually used because play() is never called with more data than reported by get_space(). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17620 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove the now superfluous mmap suboption.cladisch2006-02-131-5/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17619 b3059339-0415-0410-9bf9-f77b7e298cf2
* After removing play_mmap(), the play() function just unconditionallycladisch2006-02-131-11/+1
| | | | | | | calls play_normal(). This indirection is now superfluous. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17618 b3059339-0415-0410-9bf9-f77b7e298cf2
* This patch removes mmap support because it doesn't have any benefit.cladisch2006-02-131-151/+8
| | | | | | | | | | | | | | | | Directly accessing the sample buffer makes sense only when the samples can be constructed in-place. When the samples are just copied from another buffer (as is the case with libao2 drivers), the code to copy those samples is just a reimplementation of snd_pcm_writei(), so we could as well use that function. Besides, the current mmap code does not work except in the most simple cases: it claims to support non-interleaved and complex sample formats, but treats them the same as interleaved formats and writes to the wrong memory location. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17617 b3059339-0415-0410-9bf9-f77b7e298cf2
* Small fixes: make all global variables static, remove some unusedcladisch2006-02-101-15/+9
| | | | | | | | variables, and remove the unused dir parameter from set_xxx_near() calls. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17576 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove a call to snd_pcm_prepare() because snd_pcm_hw_params() does itcladisch2006-02-101-13/+0
| | | | | | | | automatically, and remove a call to snd_pcm_drop() because snd_pcm_close() does it automatically. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17575 b3059339-0415-0410-9bf9-f77b7e298cf2
* Simplify get_delay(): we don't need to get the complete PCM status butcladisch2006-02-101-25/+10
| | | | | | | | | | can call snd_pcm_delay() directly. To avoid the audio device appearing to be running too fast after an underrun, ignore any samples that were lost in an underrun. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17574 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix get_space(): we don't need to differentiate between the various PCMcladisch2006-02-101-55/+3
| | | | | | | | device states, and there is no need to avoid returning a positive value less than 1024. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17573 b3059339-0415-0410-9bf9-f77b7e298cf2
* This adds support for more sample formats (U32, float BE, mu/A-law).cladisch2006-02-101-0/+15
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17572 b3059339-0415-0410-9bf9-f77b7e298cf2
* This replaces the hardcoded numbers for the sample format widths with acladisch2006-02-101-31/+3
| | | | | | | call to snd_pcm_format_physical_width(). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17571 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
* massive attack: mp_msg printf format fixesrathann2006-01-121-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17367 b3059339-0415-0410-9bf9-f77b7e298cf2
* use snd_mixer_selem_set_playback_switch when muting ALSA, patch by Matthias ↵wanderer2005-12-151-0/+11
| | | | | | Lederhofer <matled -at- gmx dot net> git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17195 b3059339-0415-0410-9bf9-f77b7e298cf2
* fixrathann2005-12-051-1/+1
| | | | | | | ao_alsa.c:115: warning: suggest parentheses around assignment used as truth value git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17098 b3059339-0415-0410-9bf9-f77b7e298cf2
* reordered bps calculationhenry2005-08-251-34/+33
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16310 b3059339-0415-0410-9bf9-f77b7e298cf2
* set the nearest number of channels, return(0) upon errorshenry2005-08-251-2/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16309 b3059339-0415-0410-9bf9-f77b7e298cf2
* aos should respect the immed uninit flag (quit immediatly vs waiting till filereimar2005-02-271-0/+3
| | | | | | | is played to end). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14850 b3059339-0415-0410-9bf9-f77b7e298cf2
* Typo in hwac3 stringreimar2005-01-301-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14613 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fixed the syntax of the spdif device string.reimar2005-01-281-1/+1
| | | | | | | Thanks to Takashi Iwai for the hint. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14607 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use the subopt-helper for parsing suboptions.reimar2005-01-031-109/+57
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14329 b3059339-0415-0410-9bf9-f77b7e298cf2
* af_fmt2str_shortalex2004-12-281-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14265 b3059339-0415-0410-9bf9-f77b7e298cf2
* maybe now..alex2004-12-271-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14252 b3059339-0415-0410-9bf9-f77b7e298cf2
* hopefully final fixalex2004-12-271-6/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14250 b3059339-0415-0410-9bf9-f77b7e298cf2
* removing AFMT_ dependancyalex2004-12-271-16/+16
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14246 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make include paths consistent.diego2004-12-071-3/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14124 b3059339-0415-0410-9bf9-f77b7e298cf2
* Only use S/PDIF output when no other alsa device is set, allows to usereimar2004-10-171-4/+3
| | | | | | | external ac3 decoders. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13662 b3059339-0415-0410-9bf9-f77b7e298cf2
* allow to select an alsa mixer channel index.reimar2004-09-221-2/+23
| | | | | | | | Patch by Eric Yagerlener [eyager (at) chartermi (dot) net]. Applied with slight modifications, see also bugzilla bug #69. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13435 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use = instead if # in ALSA device name, as # irritates our config-parser.reimar2004-07-301-3/+3
| | | | | | | Original patch by stan (at) saticed (dot) me (dot) uk git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12920 b3059339-0415-0410-9bf9-f77b7e298cf2
* removed status in debug_msg as it is nonsens anyway.joyping2004-07-141-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12820 b3059339-0415-0410-9bf9-f77b7e298cf2
* volume calc fixes for mixer, by reimar döffinger, 10l reverse by mejoyping2004-07-141-6/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12812 b3059339-0415-0410-9bf9-f77b7e298cf2
* fixes provided by reimar dörfinger. mixer, subdevice parsing, alsa#help,joyping2004-07-131-78/+74
| | | | | | | set chunksize, others. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12806 b3059339-0415-0410-9bf9-f77b7e298cf2
* string, alloca etc. fixesjoyping2004-07-021-66/+34
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12748 b3059339-0415-0410-9bf9-f77b7e298cf2
* additional formats - 8bit & floathenry2004-06-111-2/+17
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12571 b3059339-0415-0410-9bf9-f77b7e298cf2
* alsa9/1.x merge, now with api_compat-definitionjoyping2004-05-121-0/+1177
printfs converted to mp_msg, thanks to adland <adland123@yahoo.com> gcc 3.4 fix, undefined label at end of case statement default device is now 'default' instead of hw:0,0. so users are able to set their own defaultdevice (dmix) in asoundrc. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12466 b3059339-0415-0410-9bf9-f77b7e298cf2