summaryrefslogtreecommitdiffstats
path: root/libmpcodecs/dec_audio.c
Commit message (Collapse)AuthorAgeFilesLines
* core: do initial A-V sync by modifying audio streamUoti Urpala2010-11-131-7/+20
| | | | | | | Add code to enforce matching pts with video when (re)starting the audio stream, by either cutting away the first samples or inserting silence at the beginning. New option -noinitial-audio-sync can be used to disable this and return to old behavior.
* libaf: add opts pointer to struct af_streamUoti Urpala2010-11-021-2/+2
|
* options: move audio_output_channels, audio_output_format to structUoti Urpala2010-11-021-2/+0
|
* audio: support parameter changes (e.g. channel count) during playbackreimar2010-11-021-4/+12
| | | | | | | | | | | | | | | | | Add support for parameter changes (e.g. channel count) during playback. This makes decoding AC3 files that switch between 2 and 6 channels work reasonably well even with -channels 6 and ffac3 decoder. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31737 b3059339-0415-0410-9bf9-f77b7e298cf2 Fix typo in error message: ACC -> AAC git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32473 b3059339-0415-0410-9bf9-f77b7e298cf2 Avoid printing AAC with SBR warning on every decode call, instead print it only after every decoder reconfiguration. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32476 b3059339-0415-0410-9bf9-f77b7e298cf2
* cleanup: Add const qualifiers for struct ad_functions pointersreimar2010-11-021-1/+1
| | | | | | | The ad_functions structs are in rodata, mark some pointers to them const. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31606 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move some sh_audio field setting out of demuxer.cUoti Urpala2010-04-231-1/+4
| | | | These fields are decoder details, not information set by the demuxer.
* 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.
* Merge svn changes up to r30463Uoti Urpala2010-03-091-0/+18
|\ | | | | | | | | | | Note that r30455 is wrong, that commit does not in fact change the default behavior as claimed in the commit message. It only breaks "-af-adv force=0", which was already pretty much useless though.
| * Add missing license headers to all files in the libmpcodecs directory.diego2010-01-301-0/+18
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30463 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Move the resync-related code into more consistent places instead of having itreimar2010-01-241-0/+2
| | | | | | | | | | | | | | scattered all over the place with half of it forgotten in some places. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30420 b3059339-0415-0410-9bf9-f77b7e298cf2
* | audio: Remove fixed decode_audio() return size limit (MAX_OUTBURST)Uoti Urpala2009-12-291-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | cosmetics: Revert old dec_audio.c code uglificationUoti Urpala2009-12-281-12/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert 3 old code uglification changes that were done with the excuse of gcc-2.95 support. The last reverted change was a fix to a bug introduced in the middle change. Revert "10l, len may change after initialization time" This reverts commit ae9db277c7dae6350cab22d9c57d78cc4684aa9c. Revert "fix declaration after statement, take 2" This reverts commit 4bceedee9305e1ebf53c598eb863aac4153e67d5. Revert "fix declaration after statement" This reverts commit aef0374c1cef269d65b8783dae8d33ee45a1f976.
* | Translation system changes part 2: replace macros by stringsAmar Takhar2009-07-071-16/+16
| | | | | | | | | | Replace all MSGTR_ macros in the source by the corresponding English string.
* | Translation system changes part 1: wrap translated stringsAmar Takhar2009-07-071-16/+16
|/ | | | | Replace mp_msg() calls which have a translated string as the format argument with mp_tmsg and add _() around all other translated strings.
* Remove reference to outdated documentation file.diego2009-04-201-1/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29209 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove unnecessary malloc.h #includes and related #ifdeffery.diego2009-04-021-4/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29126 b3059339-0415-0410-9bf9-f77b7e298cf2
* Convert HAVE_MALLOC_H into a 0/1 definition, fixes the warning:diego2009-02-171-1/+1
| | | | | | | mem.c:32:5: warning: "HAVE_MALLOC_H" is not defined git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28629 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use av_malloc/av_free for audio-related buffers to avoid crashes due toreimar2008-10-181-10/+4
| | | | | | | | insufficient alignment on systems without memalign. http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2008-October/058743.html git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27799 b3059339-0415-0410-9bf9-f77b7e298cf2
* Give a CONFIG_ prefix to preprocessor directives that lacked one anddiego2008-08-071-3/+3
| | | | | | | change arbitrary prefixes to CONFIG_. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27429 b3059339-0415-0410-9bf9-f77b7e298cf2
* Start unifying names of internal preprocessor directives.diego2008-07-301-1/+1
| | | | | | | | Replace all USE_ prefixes by CONFIG_ prefixes to indicate options which are configurable. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27373 b3059339-0415-0410-9bf9-f77b7e298cf2
* Try to keep decoded audio buffer aligned.reimar2008-07-141-1/+1
| | | | | | | Seems to be enough to avoid crashes (due to unaligned SSE2) with FFmpeg vorbis decoding for now. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27281 b3059339-0415-0410-9bf9-f77b7e298cf2
* typo fix: inited --> initializeddiego2008-02-141-10/+10
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25994 b3059339-0415-0410-9bf9-f77b7e298cf2
* Replace the persistent CODECS_FLAG_SELECTED by a local "stringset" withreimar2008-01-121-8/+10
| | | | | | | | | an almost-trivial implementation. This allows making the builtin codec structs const, and it also makes clearer that this "selected" status is not used outside the init functions. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25689 b3059339-0415-0410-9bf9-f77b7e298cf2
* 10l, len may change after initialization timerfelker2007-12-031-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25282 b3059339-0415-0410-9bf9-f77b7e298cf2
* fix declaration after statement, take 2rfelker2007-12-031-9/+10
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25281 b3059339-0415-0410-9bf9-f77b7e298cf2
* fix declaration after statementrfelker2007-12-031-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25280 b3059339-0415-0410-9bf9-f77b7e298cf2
* Simplify decode_audio function a bit.reimar2007-11-081-16/+12
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24989 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove a check+abort, this case should never happen anyway, and if it doesreimar2007-11-031-3/+0
| | | | | | | the most likely result is a NULL dereference which isn't much worse. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24946 b3059339-0415-0410-9bf9-f77b7e298cf2
* Simplify init_audio_filters() argumentsuau2007-11-011-14/+3
| | | | | | | | | | | | | | | Remove the following arguments as redundant: in_channels, in_format, out_minsize, out_maxsize. The first two always equal fields of the sh_audio_t struct given as the first argument to the function. The last two are unused after the allocation of sh_audio->a_out_buffer was changed to be done on demand. After the out_minsize and out_maxsize arguments are removed the function preinit_audio_filters() is identical to init_audio_filters(), so remove it and use the latter instead. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24922 b3059339-0415-0410-9bf9-f77b7e298cf2
* audio: simplify buffer allocation codeuau2007-11-011-13/+2
| | | | | | | | | Remove the code allocating sh_audio->a_out_buffer from init_audio_filters() and let the buffer be allocated by the new dynamic allocation code. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24921 b3059339-0415-0410-9bf9-f77b7e298cf2
* Change decode_audio() interfaceuau2007-11-011-73/+101
| | | | | | | | | | | | Rewrite decode_audio to better deal with filters that handle input in large blocks. It now always places output in sh_audio->a_out_buffer (which was always given as a parameter before) and reallocates the buffer if needed. After the changes filters can return arbitrarily large blocks of data without some of it being lost. The new version also allows simplifying some code. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24920 b3059339-0415-0410-9bf9-f77b7e298cf2
* Replace hopefully unreachable code with abort()uau2007-11-011-7/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24914 b3059339-0415-0410-9bf9-f77b7e298cf2
* dec_audio.c: Make some functions staticuau2007-11-011-2/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24913 b3059339-0415-0410-9bf9-f77b7e298cf2
* Simplify audio buffer allocation logicuau2007-11-011-7/+5
| | | | | | | | | Remove code that set sh_audio->a_out_buffer to equal sh_audio->a_buffer between the calls to init_best_audio_codec and init_audio_filters. Nothing uses the buffer between those calls. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24912 b3059339-0415-0410-9bf9-f77b7e298cf2
* Reindent dec_audio.cuau2007-11-011-332/+373
| | | | | | | Also remove some commented out code git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24911 b3059339-0415-0410-9bf9-f77b7e298cf2
* Clean up the way get_path is handled: Compile get_path.c to an object to linkdiego2007-08-281-2/+0
| | | | | | | | against instead of directly #including the C file and replace the many extern declarations by a proper header file. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24262 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add explicit location for headers from the libmpdemux/ directory.diego2007-03-151-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22619 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add explicit location for headers from the stream/ directory.diego2007-03-151-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22617 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix memory leak when changing playback speeduau2007-02-101-0/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22198 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix code that cuts audio data if the filters produce too much.uau2006-11-071-1/+2
| | | | | | | | It incorrectly used the channel count and sample size values from the decoder even though the filters can change those. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20768 b3059339-0415-0410-9bf9-f77b7e298cf2
* print bits/s, not bytes/sivo2006-10-061-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20093 b3059339-0415-0410-9bf9-f77b7e298cf2
* display correct audio bitrate, samplerate and number of channels onceivo2006-08-151-0/+3
| | | | | | | | they are known for mplayer -identify git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19409 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove empty function that isn't used anywhere (and never has been??).uau2006-08-141-4/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19399 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix buffer size sanity check to match what is actually required.uau2006-08-141-1/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19398 b3059339-0415-0410-9bf9-f77b7e298cf2
* get_path as const, patch by Stefan Huehner, stefan AT huehner-orgreynaldo2006-07-031-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18894 b3059339-0415-0410-9bf9-f77b7e298cf2
* rm unnecesary casts from void* - part 3reynaldo2006-07-021-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18884 b3059339-0415-0410-9bf9-f77b7e298cf2
* Get ride of the several if(identify) messy lines and rearangment of some of ↵reynaldo2006-04-241-2/+1
| | | | | | the output, both patches by Kiriuja mplayer-patches AT en-directo_net, his changes are barely unrelated, nevertheless Im commiting them thogeter just for the sake of my mental healt, I had both patches already applied on my local three git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18238 b3059339-0415-0410-9bf9-f77b7e298cf2
* memalign segfaults when used without declaration on amd64 (default function ↵aurel2006-02-161-0/+4
| | | | | | return type is int so the pointer was trunctated to 32bits) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17636 b3059339-0415-0410-9bf9-f77b7e298cf2
* Align memory at 16 byte boundaries.diego2006-02-141-3/+3
| | | | | | | | | This fixes crashes related to AltiVec as reported at http://mplayerhq.hu/pipermail/mplayer-advusers/2006-January/001381.html patch by Luca Barbato, lu_zero #at# gentoo #dot# org git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17626 b3059339-0415-0410-9bf9-f77b7e298cf2
* Patch by Stefan Huehner / stefan % huehner ! org \rathann2006-02-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | 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
* Push "Building audio filter chain" up to verbose level.diego2006-01-191-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17428 b3059339-0415-0410-9bf9-f77b7e298cf2
* Unify include path handling, -I.. is in CFLAGS.diego2005-11-181-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17013 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make a few more messages translatable by moving them into help_mp-en.h.diego2005-10-181-2/+2
| | | | | | | patch by Paul TT < paultt == at == hackerjournal == dot == it > git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16794 b3059339-0415-0410-9bf9-f77b7e298cf2
* Allow forcing of demuxers and codecs by prepending '+'reimar2005-08-301-3/+8
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16322 b3059339-0415-0410-9bf9-f77b7e298cf2
* 10l, missing returnfaust32005-08-251-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16307 b3059339-0415-0410-9bf9-f77b7e298cf2
* -af-adv force=1 is now default (and thus also lavcresample)reimar2005-07-101-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15951 b3059339-0415-0410-9bf9-f77b7e298cf2
* make -srate work again, unify audio filter init and preinit.reimar2005-06-241-43/+14
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15812 b3059339-0415-0410-9bf9-f77b7e298cf2
* adds some more -identify output, patch by kiriuja < mplayer DASH patches PAM ↵gpoirier2005-06-201-0/+2
| | | | | | en DASH directo POUM net> git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15790 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove file-global mpadec, add ad_driver member to sh_audio_t instead.hzoli2005-02-251-8/+10
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14820 b3059339-0415-0410-9bf9-f77b7e298cf2
* finally remove the refences to bps outside libaf. also simplification of ↵alex2005-02-251-26/+23
| | | | | | some messages and removed redundants git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14819 b3059339-0415-0410-9bf9-f77b7e298cf2
* If -af-adv force=4 is in effect, use ADCTRL_QUERY_FORMAT to query thehzoli2005-02-251-0/+8
| | | | | | | ad codec about float support and set floatne format if supported. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14816 b3059339-0415-0410-9bf9-f77b7e298cf2
* more verbose messagealex2005-02-251-3/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14815 b3059339-0415-0410-9bf9-f77b7e298cf2
* Revert sh_audio->wf freeing.iive2005-01-171-2/+0
| | | | | | | | Freeing should be done elsewhere, as it prevents second codec to access the same structure. Reported by elupus at ecce.se git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14528 b3059339-0415-0410-9bf9-f77b7e298cf2
* removing AFMT_ dependancy<