| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
FSF addresses used in PA sources are no longer valid and rpmlint
generates numerous warnings during packaging because of this.
This patch changes all FSF addresses to FSF web page according to
the GPL how-to: https://www.gnu.org/licenses/gpl-howto.en.html
Done automatically by sed-ing through sources.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PA_WRITE_FLOAT32RE()
building PA with -O0 leads to test failure in mix-test on i386
issue reported by Felipe, see
http://lists.freedesktop.org/archives/pulseaudio-discuss/2014-August/021406.html
the problem is the value 0xbeffbd7f: when byte-swapped it becomes 0x7fbdffbe and according
to IEEE-754 represents a signalling NaN (starting with s111 1111 10, see http://en.wikipedia.org/wiki/NaN)
when this value is assigned to a floating point register, it becomes 0x7ffdffbe, representing
a quiet NaN (starting with s111 1111 11) -- a signalling NaN is turned into a quiet NaN!
so PA_FLOAT32_SWAP(PA_FLOAT32_SWAP(x)) != x for certain values, uhuh!
the following test code can be used; due to volatile, it will always demonstrate the issue;
without volatile, it depends on the optimization level (i386, 32-bit, gcc 4.9):
// snip
static inline float PA_FLOAT32_SWAP(float x) {
union {
float f;
uint32_t u;
} t;
t.f = x;
t.u = bswap_32(t.u);
return t.f;
}
int main() {
unsigned x = 0xbeffbd7f;
volatile float f = PA_FLOAT32_SWAP(*(float *)&x);
printf("%08x %08x %08x %f\n", 0xbeffbd7f, *(unsigned *)&f, bswap_32(*(unsigned *)&f), f);
}
// snip
the problem goes away with optimization when no temporary floating point registers are used
the proposed solution is to avoid passing swapped floating point data in a
float; this is done with new functions PA_READ_FLOAT32RE() and PA_WRITE_FLOAT32RE()
which use uint32_t to dereference a pointer and byte-swap the data, hence no temporary
float variable is used
also delete PA_FLOAT32_TO_LE()/_BE(), not used
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Reported-by: Felipe Sateler <fsateler@debian.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Besides making the code a bit cleaner, this also gets rid of
a few "cast increases required alignment of target type"
warnings.
|
|
|
|
|
|
|
|
| |
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().
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
| |
Patch by jk.illwinter on http://www.pulseaudio.org/ticket/951
|
|
|
|
|
|
| |
use built-in function pa_frame_aligned().
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
|
| |
|
|
|
|
|
| |
Use #include "header.h" if functionality of header.h is implemented
and #include <header.h> if functionality of header.h is used.
|
|
|
|
| |
Only whitespace changes in here
|
| |
|
|
|
|
| |
sample specs
|
|
|
|
|
| |
The linear volume array needs enough padding when preparing the volumes for
mixing.
|
| |
|
|
|
|
|
| |
Pad the volume array with a copy of the start. We'll need this later to be able
to write optimized functions.
|
|
|
|
|
| |
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.
|
|
|
|
| |
Move some stuff around before splitting it into a separate file.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Move the volume functions out of the switch case and use a table indexed by the
sample format to find the volume function.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Ease generation of sine signals. Try to make the repeatable sine
memblock fit into a single mempool slot.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
up a few things
|
|
|
|
| |
volume out of the inner loop by applying it first to the per-stream volumes
|
|
|
|
| |
a volume to avoid range faults when multiplying
|
| |
|
| |
|
| |
|
|
|
|
| |
loops instead of two
|
| |
|
| |
|
|
|
|
| |
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2445 fefdeb5f-60dc-0310-8127-8f9354f1896f
|
|
|
|
|
|
| |
FLOAT32BE. Add volume adjusters for FLOAT32BE, ALAW, ULAW.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2041 fefdeb5f-60dc-0310-8127-8f9354f1896f
|
|
|
|
| |
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2040 fefdeb5f-60dc-0310-8127-8f9354f1896f
|
|
|
|
| |
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2037 fefdeb5f-60dc-0310-8127-8f9354f1896f
|
|
|
|
| |
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1971 fefdeb5f-60dc-0310-8127-8f9354f1896f
|
|
|
|
| |
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1465 fefdeb5f-60dc-0310-8127-8f9354f1896f
|