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
Pierre Ossman
521daf6f0a
Huge trailing whitespace cleanup. Let's keep the tree pure from here on,
...
mmmkay?
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1418 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-01-04 13:43:45 +00:00
Pierre Ossman
0ef2d7eb77
Support reversed endian floats. ( closes #28 ) ( closes #35 )
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1412 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-11-08 13:03:35 +00:00
Pierre Ossman
8dc6214276
Revert r1404 and keep it on a development branch until it is fully tested.
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1409 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-11-06 13:06:01 +00:00
Lennart Poettering
d210ebbb09
rework memory block management to be thread-safe and mostly lock-free.
...
pa_memblock is now an opaque structure. Access to its fields is now done
through various accessor functions in a thread-safe manner.
pa_memblock_acquire() and pa_memblock_release() are now used to access the
attached audio data. Why? To allow safe manipulation of the memory pointer
maintained by the memory block. Internally _acquire() and _release() maintain a
reference counter. Please do not confuse this reference counter whith the one
maintained by pa_memblock_ref()/_unref()!
As a side effect this patch removes all direct usages of AO_t and replaces it
with pa_atomic_xxx based code.
This stuff needs some serious testing love. Especially if threads are actively
used.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1404 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-09-26 23:50:56 +00:00
Lennart Poettering
e385d93e5a
remove all occurences of
...
pa_logXXX(__FILE__":
and replace them by
pa_logXXX("
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1272 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-08-18 21:38:40 +00:00
Lennart Poettering
0e436a6926
Rework memory management to allow shared memory data transfer. The central idea
...
is to allocate all audio memory blocks from a per-process memory pool which is
available as read-only SHM segment to other local processes. Then, instead of
writing the actual audio data to the socket just write references to this
shared memory pool.
To work optimally all memory blocks should now be of type PA_MEMBLOCK_POOL or
PA_MEMBLOCK_POOL_EXTERNAL. The function pa_memblock_new() now generates memory
blocks of this type by default.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1266 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-08-18 19:55:18 +00:00
Lennart Poettering
f44ba09265
big s/polyp/pulse/g
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1033 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-06-19 21:53:48 +00:00