summaryrefslogtreecommitdiff
path: root/src/xine-engine/audio_out.c
AgeCommit message (Collapse)Author
2009-02-09Fix race conditions in gapless_switch (ref. kde bug #180339)Miguel Freitas
2008-05-23Mark initialisation functions with malloc attribute.Diego 'Flameeyes' Pettenò
All the initialisation functions returning a new object instance that was allocated through malloc() or calloc() can get the malloc attribute so that the compiler can optimise their call.
2008-05-07xine_xmalloc() deprecation: replace its use with static and non-zero size.Diego 'Flameeyes' Pettenò
The xine_xmalloc() function is going to be deprecated, as its behaviour is rarely needed as such, and it's thus misused. With this, almost all uses of xine_xmalloc() with static size (for instance the value returned by sizeof()) or with a size that is guaranteed not to be zero (like strlen()+1) are replaced with calls to either calloc(1, ...) or malloc(). malloc() is used whenever the allocated memory is going to be immediately overwritten, while calloc() is used in every other case, as it sets the whole memory area to zero. --HG-- extra : transplant_source : %8F%98%EC%02%1E%83%F0s%06X%83C%205Y%80%B12%CC%E1
2008-01-24Only restore the audio buffer discard setting if it was altered.Darren Salt
(Cset 1a0447486a13 broke things differently.)
2008-01-24Don't discard audio samples forever. Fixed streaming playbackThibaut Mattern
2007-12-04fifo_peek_int can return NULL (when non-blocking). make fifo_remove_int ↵Matthias Kretz
handle that case
2007-12-03Fixed a race condition between ao_loop and ao_close to not lose the last buffer.Matthias Kretz
In ao_loop only read the first buffer and remove it from the fifo only when the buffer has been written or is about to be discarded. This fixes the race between ao_loop and ao_close for good. Now fifo_remove_int may signal empty again right after removing the last buffer from the fifo.
2007-12-02Don't signal fifo->empty right after reading the last bufferMatthias Kretz
but only when a read was requested and the fifo is empty. Rationale: ao_close uses fifo_wait_empty to make sure all buffers were written to the driver before it calls close on the driver. But if empty is already signaled when ao_loop just reads the next buffer then ao_close might close the driver before ao_loop has a chance to send the buffer to the driver.
2007-12-02remove redundant checkMatthias Kretz
buf must be != NULL because of the while(!fifo->first) before and the buf->next after
2007-11-23Merge.Darren Salt
2007-11-15when the stream is paused fifo_wait_empty will wait forever. In that case weMatthias Kretz
discard all buffers before calling fifo_wait_empty
2007-11-10Delete most of the CVS $Id$/$Log$ lines.Darren Salt
--HG-- extra : transplant_source : %E0%D0%C5%8B%BEU%DD%24%5D7%1F%ADV%AD%EB%23%CBU%80%EB
2007-11-09Update FSF address on non-contributed code and COPYING files.Diego 'Flameeyes' Pettenò
For contributed code, leave whatever the version we last synced for is using to make simpler future syncs.
2007-08-15Workaround for recent glibc & -D_FORTIFY_SOURCE=2 (defines open() as a macro).Darren Salt
According to bug 1773769, this breaks foo->open(). The fix (as used in Ville Skyttä's patch, which doesn't cover all cases) is to replace this with (foo->open)(). This patch was generated using sed -i -re 's/(([[:alnum:]_]+(->|\.))+open) ?\(/(\1) (/' `grep '[>.]open \?(' include -rIl` One change (in a comment) is not committed.
2007-08-15Fix an audio resampling problem which was causing regular clicking.Darren Salt
The cause was that the resampling code was using only the samples in the buffer but not really handling the transition between two buffers (which it would handle completely independently). The new code remembers the last sample from the previous buffer and uses it in the resampling. We therefore end up one sample behind and without the clicks.
2007-06-04fallback to none output when the device is unpluggedMatthias Kretz
2007-06-04handle unplugged devices in audio_alsa_out (return -1) and in audio_out ↵Matthias Kretz
close the driver on a return value <0
2007-04-08Mark various private arrays, structs & fn parameters as static and/or const.Darren Salt
Two of the modified files are headers, but each contains definitions as well as declarations and is only ever used once.
2007-04-04Reorder and pack the structures that are defined inside compilation units ↵nopadding_no_abi_changeDiego 'Flameeyes' Pettenò
instead of headers (and thus are not part of public ABI).
2007-04-01Reorder and use bitmasks to reduce the holes in the structure. This is a ↵Diego 'Flameeyes' Pettenò
private structure so it's not part of the ABI. CVS patchset: 8780 CVS date: 2007/04/01 00:52:36
2007-03-25Fix amp muting when level is still at 100. Patch by Reinhard Nissl.Diego 'Flameeyes' Pettenò
CVS patchset: 8747 CVS date: 2007/03/25 23:09:42
2006-12-25Fix race condition in audio_out by using a recursive mutex; patch by ↵Diego 'Flameeyes' Pettenò
Reinhard Nissl. [bug #1551911] CVS patchset: 8437 CVS date: 2006/12/25 15:07:51
2006-11-04Fix an assumption about the number of channels.Darren Salt
Symptoms could be buffer overruns (monaural streams) or incomplete processing. Original version of the patch is from Steve Freeland <caucasatron@yahoo.ca>. CVS patchset: 8358 CVS date: 2006/11/04 23:30:14
2006-10-16Fixed several warnings (but warnings due to APIs not solved).František Dvořák
CVS patchset: 8344 CVS date: 2006/10/16 22:18:24
2006-09-26Instead of defining the buffer every time, use a static constant buffer, ↵Diego 'Flameeyes' Pettenò
that is filled just one time. Solves CID 290 from Coverity Scan. CVS patchset: 8284 CVS date: 2006/09/26 01:13:18
2006-09-09Constantise some strings.Diego 'Flameeyes' Pettenò
CVS patchset: 8210 CVS date: 2006/09/09 17:13:16
2006-09-08some fixes to abort playback if audio driver failed to openMiguel Freitas
- don't keep trying driver->open after stop (emergency_brake) is requested - also check for failure on audio format change (implies close/open) CVS patchset: 8207 CVS date: 2006/09/08 20:32:47
2006-05-01Better fix for coverity bug 267: testsuite has found cur_time is really ↵František Dvořák
undefined when using nbc (stdin, http, ...), so the latest debug build asserted. CVS patchset: 7982 CVS date: 2006/05/01 12:05:09
2006-04-051) various warning fixesFrantišek Dvořák
2) [coverity] fixes: - 279 (w32): test should be on input parametr type, not typeW - 267 (aout): can be ignored but there was warning anyway - 234 (w32): missing free on error & exit - 152 (w32): missing free on error & exit - 148 (w32): fixed bound of static array in test - 101 (ffdec): defense code when avodec_encode_video will fail (just defense to the future, should never happen with current ffmpeg in xine) - 98, 99 (w32): check negative handle by _x_assert (it's used as index to array) - 90 (w32): negate pointer check (+added check for size) - 89 (w32): added NULL and size check CVS patchset: 7959 CVS date: 2006/04/05 22:12:17
2006-03-24Oops, broken commit...Darren Salt
CVS patchset: 7946 CVS date: 2006/03/24 20:05:38
2006-03-24Report audio vpts/clock errors. (Reinhard Nissl)Darren Salt
CVS patchset: 7945 CVS date: 2006/03/24 19:56:46
2006-03-07Fixed channels to mode translation in audio decoders.Thibaut Mattern
Patch from Chris Brien. CVS patchset: 7922 CVS date: 2006/03/07 08:03:08
2006-02-05[xine-devel] PATCH: crash in ao_change_settings when using framegrab audioMiguel Freitas
by Chris Brien CVS patchset: 7878 CVS date: 2006/02/05 19:18:28
2006-02-05try to fix "deadlock" in ao_open() when waiting on empty out_fifo to get emptyMiguel Freitas
as reported by Reinhard Nissl CVS patchset: 7877 CVS date: 2006/02/05 19:09:18
2006-01-27Adapt the engine to the new list code.Thibaut Mattern
CVS patchset: 7848 CVS date: 2006/01/27 07:46:09
2005-10-30gapless playback stream switching supportMiguel Freitas
CVS patchset: 7784 CVS date: 2005/10/30 02:18:35
2005-09-14fix the FPE due my last commitMiguel Freitas
CVS patchset: 7733 CVS date: 2005/09/14 23:42:37
2005-09-11make Alien happier ;-)Miguel Freitas
audio can be heard with non-1X speeds if audio.synchronization.slow_fast_audio is set CVS patchset: 7726 CVS date: 2005/09/11 22:07:48
2005-08-25*BUGFIX*František Dvořák
Windows ports fixes and improvements due to my current work on toxine: - first experiments with external win32 pthreads, more portable code (pthread_t may be a struct) - headers refactored - moved dirent win32 replacement to lib/, hide it for frontends, used system version, if found, not used non-POSIX dirent->d_reclen (this item doesn't work in MinGW), fix memleak in dvb - separated settings for postproc and avcodec when using external ffmpeg - check for malloc.h in public xine.m4, used it conditionally in xine headers - replaced random() by POSIX more common rand() - prevent one segfault in directx vo plugin, if fails - M$VC port update CVS patchset: 7709 CVS date: 2005/08/25 15:36:29
2005-01-20fixing equalizer gains reported by xine_get_paramStefan Holst
CVS patchset: 7364 CVS date: 2005/01/20 11:29:43
2004-12-19stop stream if audio device failed to open. user receives a notificationMiguel Freitas
and should check if any other application is using the device. CVS patchset: 7282 CVS date: 2004/12/19 20:24:30
2004-12-12huge patch ahead: reorganizing config entries with automatic conversionMichael Roitzsch
and backwards compatible translation Sorry, I got a litte tired proof-reading the patch, so their might be bugs lurking around. I will give it some further examination and (as necessary) fixing tomorrow. CVS patchset: 7233 CVS date: 2004/12/12 22:00:47
2004-11-10inc/dec the stream_t reference counterThibaut Mattern
see this thread http://thread.gmane.org/gmane.comp.video.xine.devel/11154 CVS patchset: 7111 CVS date: 2004/11/10 07:45:29
2004-10-16- Speed up amp set at 0%, add support for 8-bit sounds in the amplifierBastien Nocera
Fixes sound volume in Totem for: http://www.amayita.com/videos/01_Bar_Victoria.avi 24-bit amp support not implemented, still broken: ftp://ftp.mplayerhq.hu/MPlayer/samples/A-codecs/test-96.wav CVS patchset: 7041 CVS date: 2004/10/16 18:26:51
2004-09-26 - almost finalize headers refactoring needed for MSVC frontends (and for otherFrantišek Dvořák
poor platforms, of course) - fix a bug in generated xine-config for WIN32 and make it relocateable under Windows - MSVC port: update, fix some warnings, remove old unneeded files - improve function for getting runtime directory, it will need next fix yet (bug probably due to active volume drives) CVS patchset: 7001 CVS date: 2004/09/26 22:54:51
2004-09-01Improvements and implementing Michael's suggestions:František Dvořák
- new flags added at the end, so the users can override them properly - removed X11 libs and cflags from xine-config and libxine.pc - removed replacing for setenv (thanks to Robin for the hint) - better way for temporary disabling of w32dll module - data directories will be different on Windows - force installing catalogs with translation into XINE_LOCALEDIR - timer linked in xine-engine (just central place for linking such stuff) - adjusted load_plugins and remove reduntant WIN32 conditionals - removed unused $(lib_thr) CVS patchset: 6927 CVS date: 2004/09/01 18:19:49
2004-08-02no objections so far: committing the fine speed control patchMiguel Freitas
(in case of major trouble just revert the patch i sent to xine-devel) CVS patchset: 6871 CVS date: 2004/08/02 12:51:07
2004-07-06fix a long standing bug: streams were not played till their very end, becauseMiguel Freitas
finished event was sent to frontend before the output fifos were empty. add a test for the number of streams attached to the output port. this will prevent deadlocking on multi-streams scenarios where fifos don't ever get empty. CVS patchset: 6777 CVS date: 2004/07/06 22:53:22
2004-06-27only issue the warning on unavailable audio devices under the conditionMichael Roitzsch
(in_buf && in_buf->num_frames), otherwise, the dummy packet send by ao_exit() to wake up the audio out loop can trigger this message (because it has an undefined buf->format.rate, which, when 0 causes driver->open() to fail and the message gets emitted) we also send the message to the streams attached to this audio out only, not to all streams known to the engine CVS patchset: 6757 CVS date: 2004/06/27 13:33:57
2004-06-19modified patch from Reinhard Nissl to report the length of the out fifosMichael Roitzsch
CVS patchset: 6713 CVS date: 2004/06/19 20:07:15