Commit Graph

24 Commits

Author SHA1 Message Date
wm4 6cecbf38c1 af_volume: do not change data when volume is 1
When the volume multiplier is 1, the data shouldn't be changed, but the
code actually multiplied each sample with 255/256. Change the factor to
256, and hope there wasn't a good reason for the value 255.

Additionally, don't work on the data if it wouldn't be changed anyway.
This is a micro-optimization.

This doesn't touch the code path for the float format.
2012-01-16 22:40:14 +02:00
cboesch fe3c4810e1 cleanup: remove NULL checks before free() all over the code
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32624 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-14 13:11:20 +02:00
tack 3c2afd6786 Add support for 8 channel audio.
Where 8 channel support is non-trivial (e.g. ao_dsound), at least ensure we
fail gracefully.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29868 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-11-10 00:45:19 +00:00
diego 6e9cbdc104 whitespace cosmetics: Remove all trailing whitespace.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29305 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-05-13 02:58:57 +00:00
bircoph 42a792bbc7 Remove af_msg special-casing API in libaf.
Replace it by standard mp_msg message system.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29088 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-28 19:57:56 +00:00
diego 8198c5f15e Replace informal license notices by standard license header
and add standard license header where missing.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28264 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-01-05 12:41:40 +00:00
uau 7deec05ea0 libaf: change filter input/output ratio calculations
Change the audio filters to use a double instead of rationals for the
ratio of output to input size. The rationals could overflow when
calculating the overall ratio of a filter chain and gave no real
advantage compared to doubles.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24916 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-11-01 06:52:01 +00:00
diego 42314cb0ba Remove unnecessary unistd.h include.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22766 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-03-20 09:53:31 +00:00
diego 7ee0eb4e19 Rename open to af_open so as not to conflict with a previous header definition.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22764 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-03-20 09:46:00 +00:00
alex 4ec530c8a0 using af_softclip
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14624 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-01-31 11:43:36 +00:00
alex 507121f7fe removing AFMT_ dependancy
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14246 b3059339-0415-0410-9bf9-f77b7e298cf2
2004-12-27 17:30:15 +00:00
rfelker 81a6897343 very old 10l, discussed a long time ago but never fixed (default should be same vol, not -10 dB)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14069 b3059339-0415-0410-9bf9-f77b7e298cf2
2004-11-30 19:02:29 +00:00
diego 320e68675a The full name of the GPL is GNU General Public License.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13603 b3059339-0415-0410-9bf9-f77b7e298cf2
2004-10-10 14:20:42 +00:00
alex d04df91cbe remove the latest use of log10 in favor of the better af_to_dB helper function, patch by Reimar Doffinger
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12642 b3059339-0415-0410-9bf9-f77b7e298cf2
2004-06-25 15:26:59 +00:00
anders 1e282bf64b Changing initial volume level to 0dB after loud intensive complaints
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9044 b3059339-0415-0410-9bf9-f77b7e298cf2
2003-01-20 10:46:32 +00:00
anders 05c85403c4 10l bug for float conversion control + feature fix in volume control
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8869 b3059339-0415-0410-9bf9-f77b7e298cf2
2003-01-10 01:45:34 +00:00
anders e1718bed19 New auto config for volume and resample and added support for float flag in configuration
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8868 b3059339-0415-0410-9bf9-f77b7e298cf2
2003-01-10 01:01:38 +00:00
rathann 84834e9d34 Added/reordered #includes to silence warnings about "implicit declaration".
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8624 b3059339-0415-0410-9bf9-f77b7e298cf2
2002-12-28 18:51:10 +00:00
anders 6adaa78ee9 Changes includes:
- Improved runtime control system
- 3 New filter panning, compressor/limiter and a noise gate
  - The compressor/limiter and the noise gate are not yet finished
  - The panning filter does combined mixing and channel routing and
    can be used to down-mix from stereo to mono (for example)
- Improvements to volume and channel
  - volume now has a very good soft clipping using sin()
  - channel can handle generic routing of audio data
- Conversion of all filters to handle floating point data
- Cleanup of message printing
- Fix for the sig 11 bug reported by Denes


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8608 b3059339-0415-0410-9bf9-f77b7e298cf2
2002-12-28 13:59:53 +00:00
anders 3678657416 Printing of max volume on exit
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8187 b3059339-0415-0410-9bf9-f77b7e298cf2
2002-11-14 09:49:06 +00:00
anders 66f4e56389 New features:
-- Support for runtime cpu detection
-- Stand alone compile of libaf
-- Unlimited number of channels (compiletime switch)
-- Sample format defined by bit-fields
-- New formats: float, A-Law and mu-law
-- Format conversion set in human readable format
   i.e. format=4:us_be to set 32 bit unsigned big endian output
-- Format reporting in human readable format
-- Volume control has only one parameter for setting the volume
   i.e. volume=-10.0:1:0:1 to set atenuation = -10dB


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8168 b3059339-0415-0410-9bf9-f77b7e298cf2
2002-11-12 12:33:56 +00:00
anders a72b161551 Changing the behavour of the commandline parameter -af to conform with -vop. Adding new commanline parameter -af-adv for advanced af options. Adding changes to volume control to support commandline parameters.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7994 b3059339-0415-0410-9bf9-f77b7e298cf2
2002-10-31 08:03:51 +00:00
rfelker e935c134ff enable volume filter and fix nonsense default volume (still not usable
because mixer.c has no mechanism to pass volume commands to libaf)


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7975 b3059339-0415-0410-9bf9-f77b7e298cf2
2002-10-30 04:11:26 +00:00
anders 4d6e54d22d Adding volume control and moving control() call parameters to a seperate file
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7746 b3059339-0415-0410-9bf9-f77b7e298cf2
2002-10-16 01:49:40 +00:00