aboutsummaryrefslogtreecommitdiffhomepage
path: root/libao2/ao_alsa.c
Commit message (Collapse)AuthorAge
* Add workarounds for old prerelease versions of alsa-lib 0.9.0 that didGravatar cladisch2006-03-31
| | | | | | | 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, tryGravatar cladisch2006-03-13
| | | | | | | 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 noneGravatar cladisch2006-03-13
| | | | | | | 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 ofGravatar cladisch2006-02-27
| | | | | | | 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 compiledGravatar cladisch2006-02-27
| | | | | | | 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,Gravatar cladisch2006-02-13
| | | | | | | | | 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 theGravatar cladisch2006-02-13
| | | | | | | | 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 otherGravatar cladisch2006-02-13
| | | | | | | | | | | | 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.Gravatar cladisch2006-02-13
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17619 b3059339-0415-0410-9bf9-f77b7e298cf2
* After removing play_mmap(), the play() function just unconditionallyGravatar cladisch2006-02-13
| | | | | | | 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.Gravatar cladisch2006-02-13
| | | | | | | | | | | | | | | | 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 unusedGravatar cladisch2006-02-10
| | | | | | | | 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 itGravatar cladisch2006-02-10
| | | | | | | | 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 butGravatar cladisch2006-02-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 PCMGravatar cladisch2006-02-10
| | | | | | | | 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).Gravatar cladisch2006-02-10
| | | | 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 aGravatar cladisch2006-02-10
| | | | | | | 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 \Gravatar rathann2006-02-09
| | | | | | | | | | | | | | | | | | | | | | 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 fixesGravatar rathann2006-01-12
| | | | 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 ↵Gravatar wanderer2005-12-15
| | | | | | Lederhofer <matled -at- gmx dot net> git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17195 b3059339-0415-0410-9bf9-f77b7e298cf2
* fixGravatar rathann2005-12-05
| | | | | | | 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 calculationGravatar henry2005-08-25
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16310 b3059339-0415-0410-9bf9-f77b7e298cf2
* set the nearest number of channels, return(0) upon errorsGravatar henry2005-08-25
| | | | 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 fileGravatar reimar2005-02-27
| | | | | | | is played to end). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14850 b3059339-0415-0410-9bf9-f77b7e298cf2
* Typo in hwac3 stringGravatar reimar2005-01-30
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14613 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fixed the syntax of the spdif device string.Gravatar reimar2005-01-28
| | | | | | | 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.Gravatar reimar2005-01-03
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14329 b3059339-0415-0410-9bf9-f77b7e298cf2
* af_fmt2str_shortGravatar alex2004-12-28
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14265 b3059339-0415-0410-9bf9-f77b7e298cf2
* maybe now..Gravatar alex2004-12-27
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14252 b3059339-0415-0410-9bf9-f77b7e298cf2
* hopefully final fixGravatar alex2004-12-27
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14250 b3059339-0415-0410-9bf9-f77b7e298cf2
* removing AFMT_ dependancyGravatar alex2004-12-27
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14246 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make include paths consistent.Gravatar diego2004-12-07
| | | | 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 useGravatar reimar2004-10-17
| | | | | | | 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.Gravatar reimar2004-09-22
| | | | | | | | 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.Gravatar reimar2004-07-30
| | | | | | | 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.Gravatar joyping2004-07-14
| | | | 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 meGravatar joyping2004-07-14
| | | | 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,Gravatar joyping2004-07-13
| | | | | | | set chunksize, others. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12806 b3059339-0415-0410-9bf9-f77b7e298cf2
* string, alloca etc. fixesGravatar joyping2004-07-02
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12748 b3059339-0415-0410-9bf9-f77b7e298cf2
* additional formats - 8bit & floatGravatar henry2004-06-11
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12571 b3059339-0415-0410-9bf9-f77b7e298cf2
* alsa9/1.x merge, now with api_compat-definitionGravatar joyping2004-05-12
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