Commit graph

64 commits

Author SHA1 Message Date
poljar (Damir Jelić)
d806b19714 Remove pa_bool_t and replace it with bool.
commands used for this (executed from the pulseaudio/src directory):
    find . -regex '\(.*\.[hc]\|.*\.cc\|.*\.m4\)' -not -name 'macro.h' \
        -a -not -name 'reserve.[ch]' -a -not -name 'reserve-monitor.[ch]' \
        -a -not -name 'glib-mainloop.c' -a -not -name 'gkt-test.c' \
        -a -not -name 'glib-mainloop.c' -a -not -name 'gkt-test.c' \
        -a -not -name 'poll-win32.c' -a -not -name 'thread-win32.c' \
        -a -not -name 'dllmain.c' -a -not -name 'gconf-helper.c' \
        -exec sed -i -e 's/\bpa_bool_t\b/bool/g' \
        -e 's/\bTRUE\b/true/g' -e 's/\bFALSE\b/false/g' {} \;

and:
    sed -i -e '181,194!s/\bpa_bool_t\b/bool/' \
        -e '181,194!s/\bTRUE\b/true/' -e \
        '181,194!s/\bFALSE\b/false/' pulsecore/macro.h
2013-07-04 12:25:30 +03:00
poljar (Damir Jelić)
cbd274676d Style fix: Add a space between the closing/opening bracket
This patch replaces every occurrence of '){' with ') {'.
The ffmpeg source tree was excluded since it will disappear anyways.

Command used for this:
    find . -type d \( -name ffmpeg \) -prune -o \
        -regex '\(.*\.[hc]\|.*\.cc\)' \
        -exec sed -i -e 's/){/) {/' {} \;
2013-06-24 16:56:24 +03:00
Maarten Bosmans
b4e938e194 Move i18n.[ch] to src/pulsecore
The header is used in files troughout the tree and is not included in the public api,
so it belongs in pulsecore, not in pulse.
2011-08-11 13:23:42 +02:00
Maarten Bosmans
dd9265ac78 Remove unnecessary #includes 2011-06-22 23:12:20 +01:00
Maarten Bosmans
684b89c639 Fix up some double spaces 2011-03-18 09:20:07 +00:00
Maarten Bosmans
9cbf19b59b Various fixes for build warnings 2011-03-02 15:02:42 +00:00
Arun Raghavan
49101fc540 volume: Clamp volume to PA_VOLUME_MAX
This ensures that we always clamp the volume to PA_VOLUME_MAX. While
this currently has no effect, it will be required for making sure we
don't exceed PA_VOLUME_MAX when its value changes in the future.
2010-10-15 01:10:00 +05:30
Arun Raghavan
1d2ef7923d volume: Use a macro to check if a volume is valid
This adds a PA_VOLUME_IS_VALID() macro for checking if a given
pa_volume_t is valid. This makes changes to the volume ranges simpler
(just change PA_VOLUME_MAX, for example, without needing to modify any
other code).
2010-10-15 01:10:00 +05:30
Vladimir Kokarev
d2c59354d5 volume: add pa_cvolume_inc_clamp function
added function to increase volume not exceeding specified limit
simply changed PA_VOLUME_MAX to 'limit' in pa_cvolume_inc
pa_cvolume_inc now calls pa_cvolume_inc_clamp with PA_VOLUME_MAX limit
2009-11-05 04:56:47 +01:00
Lennart Poettering
f5046759cd llvm-clang-analyzer: drop a few unnecessary assignments and other trivial fixes 2009-09-08 23:46:23 +02:00
Lennart Poettering
41a0dc1e99 volume: if pa_cvolume_set_{balance|fade}() is called with invalid fade/balance value log, but don't assert 2009-09-07 20:11:11 +02:00
Lennart Poettering
d000dd6f4b volume: when passing NULL as channel map to pa_cvolume_scale_mask() handle this the same way as pa_cvolume_scale() 2009-09-07 20:11:08 +02:00
Lennart Poettering
9755bfa58a volume: drop some redundant but expensive validity checks 2009-09-07 20:09:52 +02:00
Lennart Poettering
cc6c4fe91f volume: add a couple of validity checks for pa_volume_t arguments 2009-09-07 19:59:18 +02:00
Lennart Poettering
3bbc5e6a4d volume: fix definition of PA_VOLUME_MAX and introduce PA_VOLUME_INVALID and use it wherever applicable 2009-09-07 19:53:39 +02:00
Lennart Poettering
cfef930036 volume: introduce pa_cvolume_{inc|dec}() 2009-08-19 02:32:36 +02:00
Lennart Poettering
1421eff0b6 volume: use PA_VOLUME_MAX instead of (pa_volume_t) -1 2009-08-19 02:31:11 +02:00
Lennart Poettering
ef01baf613 volume: round properly when showing human readable volume percentages 2009-08-19 00:58:20 +02:00
Lennart Poettering
96f01b822a volume: simplify volume multiplifactions, do them in integer only 2009-08-19 00:57:58 +02:00
Lennart Poettering
d634555a3e volume: introduce pa_cvolume_min() and pa_cvolume_min_mask() 2009-08-19 00:56:16 +02:00
Lennart Poettering
caa7928972 libpulse: some minor optimizations when checking equality 2009-08-17 03:50:04 +02:00
Lennart Poettering
8208214882 volume: add pa_cvolume_merge() call 2009-08-17 03:40:36 +02:00
Lennart Poettering
0f2a4ed422 volume: guarantee dB/linear conversion is reversible 2009-08-14 20:03:30 +02:00
Lennart Poettering
083b17b28a volume,channelmap: reimplement a couple of calls based on channel masks 2009-06-17 03:09:28 +02:00
Lennart Poettering
64b0f38b67 volume: implement functions for multiplicating a cvolume with a scalar 2009-06-17 03:04:21 +02:00
Lennart Poettering
8b180b6368 volume: implement pa_cvolume_{scale|max|avg}_mask() 2009-05-25 23:55:44 +02:00
Lennart Poettering
000bdb8d25 volume: change pa_volume_t mapping to cubic 2009-05-22 01:30:54 +02:00
Lennart Poettering
905c8004a0 volume: introduce pa_cvolume_{get|set}_position() 2009-05-13 15:20:45 +02:00
Lennart Poettering
237a9e12f8 volume: increase dB range to -90dB
Increasing the volume range to -90dB has the benefit of corresponding
with a volume decrease from the full 16 bit signal to 0.

This also makes us a bit more like traditional stereos
2009-04-13 22:41:44 +02:00
Lennart Poettering
14e89d4ecd when calculating volume from dB use ceil() 2009-04-08 03:47:48 +02:00
Lennart Poettering
d612fbb802 compare with doubles, not integer 2009-04-07 04:02:25 +02:00
Colin Guthrie
86dee05aec Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
Lennart Poettering
32e5e64921 add a lot of validity checking 2009-02-03 21:57:58 +01:00
Lennart Poettering
543115ae17 add new API pa_cvolume_compatible_with_channel_map() 2009-02-03 21:15:32 +01:00
Lennart Poettering
554c818d21 before applying balance/fade check it actually makes sense 2009-02-03 04:05:41 +01:00
Lennart Poettering
e412f1cde3 whitespace cleanup 2009-02-02 01:54:09 +01:00
Lennart Poettering
1b53f8297f implement pa_cvolume_{get|set}_fade 2009-01-30 00:22:59 +01:00
Lennart Poettering
9314db79db fix a bogus assert 2009-01-30 00:14:50 +01:00
Lennart Poettering
634afede7d properly deal with the case when l/r is silent when adjust balance 2009-01-30 00:14:28 +01:00
Lennart Poettering
ee17772cea add missing 'const' 2009-01-27 23:39:58 +01:00
Lennart Poettering
5449d793ae swap argument order of pa_cvolume_get_balance() to be a bit more systematic 2009-01-27 02:45:37 +01:00
Lennart Poettering
4e31e00b63 implement pa_cvolume_scale() 2009-01-27 00:47:07 +01:00
Lennart Poettering
936862362c don't divide by zero if no left resp. no right channels are defined 2009-01-20 03:24:11 +01:00
Lennart Poettering
5f6641cfdd Beef pactl output up a bit 2009-01-19 23:07:34 +01:00
Lennart Poettering
723d71a021 add api for manipulating volume balances 2009-01-19 21:45:58 +01:00
Lennart Poettering
6342053b34 Add new API functions pa_volume_snprint() and pa_sw_volume_snprint_dB() 2008-12-24 00:45:06 +01:00
Lennart Poettering
da4ad5ed01 implement pa_sw_volume_divide() and pa_sw_cvolume_divide() 2008-10-04 01:40:41 +02:00
Lennart Poettering
7a1a147881 rename pa_cvolume_snprint_dB to pa_sw_cvolume_snprint_dB since it is
useful only for software volumes
2008-10-03 22:21:27 +02:00
Lennart Poettering
bde142c237 when checking the validity of a cvolume check whether all values are not -1 2008-10-03 17:45:04 +02:00
Lennart Poettering
ebb2ecbe12 add new API call pa_cvolume_compatible() 2008-10-03 17:43:40 +02:00