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
Peter Meerwald
1335914e72
sample-util: Remove duplicate stdio.h #include
...
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2013-02-15 21:33:25 +02:00
Peter Meerwald
95b64804ab
core: Move pa_mix() into new file mix.c
...
idea is to allow optimized code path (similar to volume code)
and rework/specialize mixing cases to enable runtime performance improvements
no functionality changes in this patch
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2013-02-15 21:33:07 +02:00
Tanu Kaskinen
3d6092bb0f
memblock: Add pa_memblock_acquire_chunk().
...
Besides making the code a bit cleaner, this also gets rid of
a few "cast increases required alignment of target type"
warnings.
2012-08-22 09:47:03 +03:00
Tanu Kaskinen
2f7a586a23
sample-util: Remove redundant check from pa_volume_memchunk.
...
Add also an assertion for the sample spec validity. The
existing code already does crash in case of an invalid
sample spec, but the error would not be as obvious: the
crash would happen due to a divide-by-zero operation in
pa_frame_aligned().
2012-03-28 17:22:44 +03:00
David Henningsson
2ce7d38005
sample-util: Fix "Darth Vader" panning bug
...
For muted channels, we forgot to increment a pointer, so if one
channel was muted but not the other, sound became distorted in a
Darth Vader like way. To test the difference, start two input
streams and pan one of them hard left (or right).
And hey, if you didn't think it sounded like Darth Vader, it's
your imagination that's broken, not mine! ;-)
BugLink: https://bugs.launchpad.net/bugs/928757
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2012-02-10 15:06:35 +05:30
Maarten Bosmans
c5dca7cf2b
More spelling fixes
2011-08-25 11:27:47 +01:00
Arun Raghavan
9083a8f667
sample-util: Fix off-by-one in error check
...
Patch by jk.illwinter on http://www.pulseaudio.org/ticket/951
2011-08-18 14:19:00 +05:30
Lu Guanqun
625380d809
sample-util: use built-in function
...
use built-in function pa_frame_aligned().
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
2011-08-11 10:36:21 +02:00
Maarten Bosmans
dd9265ac78
Remove unnecessary #includes
2011-06-22 23:12:20 +01:00
Maarten Bosmans
b3721a12c5
Fixup #include directives according to Coding Style
...
Use #include "header.h" if functionality of header.h is implemented
and #include <header.h> if functionality of header.h is used.
2011-03-11 11:49:39 +00:00
Maarten Bosmans
ecf09f2cd6
Fix up according to Coding Style
...
Only whitespace changes in here
2011-03-11 11:49:35 +00:00
Lennart Poettering
168be3830a
use pa_fopen_cloexec() where applicable
2009-10-30 04:54:19 +01:00
Lennart Poettering
1f0904b800
sample-util: add pa_convert_size() call for converting sizes between two sample specs
2009-09-09 04:27:16 +02:00
Wim Taymans
9d25467964
sample-util: avoid stack overrun
...
The linear volume array needs enough padding when preparing the volumes for
mixing.
2009-08-27 10:44:52 +02:00
Wim Taymans
f09b51198f
whitespace fixes
2009-08-20 11:31:04 +02:00
Wim Taymans
2d73f13567
samples-util: add padding to volume array
...
Pad the volume array with a copy of the start. We'll need this later to be able
to write optimized functions.
2009-08-20 11:30:55 +02:00
Wim Taymans
3d008961c0
sample-util: move volume code to separate file
...
Move the volume code into a separate file with the reference C implementations.
Add a function to retrieve the volume function and one to install a new one.
2009-08-20 11:29:48 +02:00
Wim Taymans
e71e644eb6
sample-util: move some functions around
...
Move some stuff around before splitting it into a separate file.
2009-08-20 11:29:47 +02:00
Wim Taymans
5b8b6544e2
sample-utils: coding style cleanup
...
Make the coding style match the rest of pulseaudio more.
Remove some liboil functions, they seem unoptimized and likely slower than our
handrolled versions here.
2009-08-20 11:29:47 +02:00
Wim Taymans
26839c4b9e
sample-utils: split out functions from case
...
Move the volume functions out of the switch case and use a table indexed by the
sample format to find the volume function.
2009-08-20 11:29:47 +02:00
Lennart Poettering
89e3adf8cd
sample: fix build on BE archs
2009-06-08 18:22:19 +02:00
Lennart Poettering
d2b5ae5525
sample-util: fix iteration loop when adjusting volume of s24 samples
2009-05-01 04:14:40 +02:00
Lennart Poettering
3a7b287c7e
sample-util: properly allocate silence block for s24-32 formats
2009-05-01 04:14:02 +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
2a238b2d7f
don't overflow when we do digital amplification of 16 bit samples
2009-01-23 19:40:01 +01:00
Lennart Poettering
4a13763797
Add support for 24bit samples encoded in the LSB of 32 bit words
2009-01-16 18:39:36 +01:00
Lennart Poettering
6dc76d1158
add support for 24bit packed samples
2009-01-16 03:15:39 +01:00
Lennart Poettering
b8e6aae08e
add new API function pa_memchunk_sine()
...
Ease generation of sine signals. Try to make the repeatable sine
memblock fit into a single mempool slot.
2009-01-12 19:48:44 +01:00
Lennart Poettering
98049fbf81
make things compile again
2009-01-08 23:31:05 +01:00
Lennart Poettering
aff7768fb1
Add new debuuging API pa_memchunk_dump_to_file()
2009-01-08 21:12:03 +01:00
Lennart Poettering
519bb556cd
fix return value of pa_frame_aligned()
2008-10-21 18:26:24 +02:00
Lennart Poettering
2367212ec3
make a few casts explicit to remove compiler warnings
2008-10-03 17:14:58 +02:00
Lennart Poettering
33b186e74d
user lrint() and friends in inner loops instead of normal C casts to speed up a few things
2008-10-03 02:34:59 +02:00
Lennart Poettering
7d442e3276
optimize mixing routines a bit by pulling the multiplication with the global volume out of the inner loop by applying it first to the per-stream volumes
2008-10-03 01:53:34 +02:00
Lennart Poettering
ea82dec294
when we mix into a 16bit accumulator make sure we clamp before we scale with a volume to avoid range faults when multiplying
2008-10-02 02:29:56 +02:00
Lennart Poettering
bb8263be6f
add byte-to-usec and usec-to-byte converters that round up, not down
2008-08-28 17:53:01 +02:00
Lennart Poettering
b7026bf248
add a few more gcc warning flags and fix quite a few problems found by doing so
2008-08-19 22:39:54 +02:00
Lennart Poettering
c4dff4d416
otpimize mixing code a bit by moving a few checks out of the inner loops
2008-08-11 18:34:38 +02:00
Lennart Poettering
5b2a83733d
optimize volume changing a bit by only using a single counter for the inner loops instead of two
2008-08-11 15:19:52 +02:00
Lennart Poettering
b604290803
adhere to struct gcc aliasing rules
2008-08-11 15:17:30 +02:00
Lennart Poettering
8ae83d618e
get rid of svn $ keywords
2008-06-18 23:23:21 +03:00
Lennart Poettering
045c1d602d
merge glitch-free branch back into trunk
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2445 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-05-15 23:34:41 +00:00
Lennart Poettering
b0a68fd09f
optimize mixing code a bit. Add mixers for S32LE, S32BE, ULAW, ALAW and FLOAT32BE. Add volume adjusters for FLOAT32BE, ALAW, ULAW.
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2041 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-11-09 17:11:45 +00:00
Lennart Poettering
c1985c2acc
replace a few CLAMPs by PA_CLAMP_UNLIKELY
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2040 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-11-09 14:20:12 +00:00
Lennart Poettering
7e0f547f2f
add support for 32bit integer samples
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2037 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-11-09 02:45:07 +00:00
Lennart Poettering
a67c21f093
merge 'lennart' branch back into trunk.
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1971 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-10-28 19:13:50 +00:00
Lennart Poettering
1e12e0ee8d
Kill spaces on EOL
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1465 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-05-29 17:24:48 +00:00
Lennart Poettering
33304ba118
Fix a DoS with allocating overly large silence buffers. (Identified by Luigi Auriemma (re #67 )
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1450 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-05-23 16:59:03 +00:00
Pierre Ossman
06211b7c8f
Add copyright notices to all relevant files. (based on svn log)
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1426 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-02-13 15:35:19 +00:00