Georg Chini
a42241ec95
sample.c: Allow module-loopback to exceed PA_RATE_MAX
...
The rate set by module loopback may exceed PA_RATE_MAX by 1%, therefore
allow rates higher than PA_RATE_MAX in pa_sample_rate_valid().
2017-04-14 15:03:56 +02:00
Peter Meerwald-Stadler
83f0a34ea6
sample: Assert validity of sample_spec
...
passing an invalid sample_spec to
pa_sample_size_of_format(),
pa_frame_size(),
pa_bytes_per_second(),
pa_bytes_to_usec(),
pa_usec_to_bytes()
currently gives a result of 0
this is problematic as
(a) it leads to many potential divide-by-zero issues flagged by Coverity,
(b) pa_sample_spec_valid() is called often and the mostly unnecessary validation
of the sample_spec cannot be optimized away due to pa_return_val_if_fail()
(c) nobody checks the result for 0 and the behaviour is not documented
this patch replaces pa_return_val_if_fail() with pa_assert()
note that this commit changes the API!
note that pa_return_val_if_fail() strangely logs an assertion, but then happily
continues...
fixes numerious CIDs
2016-09-04 23:06:04 +02:00
Ondrej Holecek
5effc83479
update FSF addresses to FSF web page
...
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.
2015-01-14 22:20:40 +02:00
Tanu Kaskinen
2747c96101
Add pa_channels_valid()
...
I think this makes the code a bit nicer to read and write. This also
reduces the chances of off-by-one errors when checking the bounds of
channel count values.
2013-12-15 11:44:35 +01:00
Tanu Kaskinen
a67318f8af
Add pa_sample_rate_valid()
...
I think this makes the code a bit nicer to read and write. This also
reduces the chances of off-by-one errors when checking the bounds of
sample rate values.
2013-12-15 11:21:56 +01:00
Tanu Kaskinen
1cda717252
Add pa_sample_format_valid()
...
I think this makes the code a bit nicer to read and write. This also
reduces the chances of off-by-one errors when checking the bounds of
the sample format value.
2013-12-15 11:07:17 +01: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
Arun Raghavan
802c8b6fcc
sample: Use PA_SAMPLE_INVALID instead of numeric value
2011-05-02 10:17:20 +05:30
Wim Taymans
d2389ef96e
sample: manually inline table lookups
...
Manually inline some table lookups to avoid excessive calls to
pa_sample_spec_valid().
2009-08-20 11:31:04 +02:00
Lennart Poettering
caa7928972
libpulse: some minor optimizations when checking equality
2009-08-17 03:50:04 +02:00
Lennart Poettering
346a708c2c
sample: introduce pa_sample_format_is_{le,be,ne,re}()
2009-05-25 23:49:47 +02:00
Lennart Poettering
d4b10d838a
sample: correctly pass s24-32 formats
2009-05-01 04:12:24 +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
ce76216bce
add pa_sample_size_of_format()
2009-02-04 17:10:15 +01:00
Lennart Poettering
32e5e64921
add a lot of validity checking
2009-02-03 21:57:58 +01:00
Lennart Poettering
b51ed38116
add a bit of missing i18n
2009-02-03 21:56:52 +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
891989896d
add new API function pa_sample_spec_init()
2008-10-03 17:13:17 +02:00
Lennart Poettering
8a50105fe0
if a volume or channel map is invalid show so when printing it
2008-10-03 15:16:26 +02:00
Lennart Poettering
f1d2bf8408
add i18n support
2008-08-06 18:54:13 +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
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
4a05bc9bdc
don't allow excessively high sample rates
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1449 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-05-23 16:57:35 +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
Lennart Poettering
d89066036b
modify pa_bytes_snprint() to return the string we just wrote to. This should be binary compat with older versions which returned void
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1259 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-08-17 20:02:46 +00:00
Lennart Poettering
9310a2e3b8
fix calculation of pa_usec_to_bytes, to make sure that it never returns fractions of a frame size
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1165 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-07-29 15:02:53 +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