Arun Raghavan
8ce8c93cb7
padsp: Write only frame-aligned chunks to the stream
...
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=101121
2017-06-05 01:26:51 +03:00
Peter Meerwald-Stadler
a199b9045e
build: Use #ifdef to check for #defines
...
for example, in case HAVE_MEMFD is #undef, checking with #if HAVE_MEMFD
gives a warning (gcc 5.4.1, Ubuntu)
pulsecore/shm.c: In function 'sharedmem_create':
pulsecore/shm.c:208:5: warning: "HAVE_MEMFD" is not defined [-Wundef]
#if HAVE_MEMFD
use #ifdef or #if defined() to check for presence of a #define
Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
2017-03-08 14:31:29 +01:00
Peter Meerwald-Stadler
c99efbffd6
padsp: Fix flush and improve error handling
...
read() can return a number of bytes read less than k
in addition, handle EAGAIN and EOF
CID 1137981
2016-09-02 14:52:53 +02:00
Kamil Rytarowski
a1191874fe
solaris: Illumos does not ship with SOUND_PCM* functionality
...
Code reference:
https://github.com/joyent/illumos-joyent/blob/master/usr/src/uts/common/sys/audio/audio_oss.h
Add autoconf checks for:
- SOUND_PCM_READ_RATE
- SOUND_PCM_READ_CHANNELS
- SOUND_PCM_READ_BITS
Some platforms like SunOS (Illumos) may ship without SOUND_PCM_* functionality
Thanks to Jonathan Perkin (Joyent) for Illumos code reference.
2016-01-22 13:25:29 +05:30
Deepak Srivastava
8b3b39c7d8
padsp: Avoid possible deadlock. Unlocked i->mainloop before returning from default case.
...
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=91184
Signed-off-by: Deepak Srivastava <srivastava.d@samsung.com>
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2015-07-21 16:44:26 +02:00
Peter Meerwald
6942e13a36
padsp: Fix wrong condition discovered by -Wlogical-not-parentheses warning
...
warnings emited by gcc 5.1:
utils/padsp.c: In function 'dsp_trigger':
utils/padsp.c:1902:39: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
while (!pa_operation_get_state(o) != PA_OPERATION_DONE) {
^
utils/padsp.c: In function 'dsp_cork':
utils/padsp.c:1937:39: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
while (!pa_operation_get_state(o) != PA_OPERATION_DONE) {
^
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2015-05-27 19:16:38 +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
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
Tanu Kaskinen
94ac039b87
padsp: Handle holes in recording streams.
2013-02-04 12:07:36 +02:00
Tanu Kaskinen
c2c5e044cc
padsp: Fix a double-free bug.
2012-03-28 17:22:23 +03:00
Maarten Bosmans
c5dca7cf2b
More spelling fixes
2011-08-25 11:27:47 +01:00
Arun Raghavan
157bc4ef3b
padsp: Handle eol in info callbacks correctly
...
When receiving an eol, the object will be NULL and we're not handling
this correctly. Thanks to Drew Ogle <dantealiegri@gmail.com> for
reporting this and providing a patch.
2011-07-11 20:59:30 -07:00
Maarten Bosmans
684b89c639
Fix up some double spaces
2011-03-18 09:20:07 +00:00
Michal Schmidt
4bb8a83c62
padsp: wrap __open_2 and __open64_2
...
These functions are used in OSS programs where the "flags" parameter for
open() is not a build-time constant and the build has _FORTIFY_SOURCE
enabled.
2011-01-10 20:49:40 +00:00
Lennart Poettering
69ddfaf6ed
padsp: emulate /dev/audio, too
...
https://bugzilla.redhat.com/show_bug.cgi?id=561262
2010-02-21 17:47:31 +01:00
Lennart Poettering
7b76ea3784
core-util: unify how we determine the temporary directory
2009-09-17 21:06:54 +02:00
Lennart Poettering
2d9168ceb3
Improve TMPDIR handling
...
Patch from 'jnelson',
http://pulseaudio.org/ticket/653
2009-09-17 20:58:36 +02:00
Lennart Poettering
7cc100d9e1
padsp: properly return return values (llvm-clang-analyzer)
2009-09-08 23:54:53 +02:00
Lennart Poettering
49fd8ee72e
core-util: replace remaining fixed size destination string functions by _malloc() versions
...
This helps portability to GNU/Hurd.
Patch originally from Samuel Thibault but modified.
Closes ticket #546
2009-08-01 02:03:22 +02:00
Colin Guthrie
86dee05aec
Use LGPL 2.1 on all files previously using LGPL 2
2009-03-03 20:23:02 +00:00
Marc-André Lureau
bb52a6753b
padsp: don't use si if it's NULL
2009-02-19 04:55:28 +01:00
Lennart Poettering
63fc26ed03
Allow access("/dev/dsp", W_OK) succeed
...
Some stupid apps (such as X-lite Softphone) check for W_OK on /dev/dsp.
This is of course crazy but easy for us to support.
Closes rhbz #474313
2008-12-18 15:24:02 +01:00
Lennart Poettering
54afcf2598
inform dsp_empty_socket() *after* we emptied the dsp socket, that it is now empty
2008-10-02 01:02:31 +02:00
Lennart Poettering
cbd8e60f6c
use PA_STREAM_EARLY_REQUESTS for OSS streams
2008-09-03 19:51:12 +02:00
Lennart Poettering
13018d62c1
fix a few compiler warnings on older gcc
2008-08-29 23:53:55 +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
e0dd72afcb
fix error path (spotted by Coling Guthrie)
2008-08-05 16:31:17 +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
e382f2233f
merge r2183 from prepare-0.9.10
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2199 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-03-31 22:05:10 +00:00
Lennart Poettering
75e1ebdf77
Improve compatibility with applications which like to pass invalid strings to the libc functions we overwrite, by handing directly to the original function. Patch by Colin Guthrie and Gustavo De Nardin, Closes #227
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2106 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-02-15 11:50:48 +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
Pierre Ossman
0694d2ae35
Make sure mixer ioctls work on /dev/dsp aswell.
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1473 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-06-13 07:21:57 +00:00
Pierre Ossman
14cbbe1096
Support stat() and friends as some programs (audacity) likes to check if
...
the device node is there first.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1467 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-06-11 11:22:30 +00:00
Pierre Ossman
13a4c5290a
Add support for the poorly documented SNDCTL_DSP_GETTRIGGER.
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1466 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-06-04 09:52:03 +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
8e738ede9b
fix a few obvious copynpaste errors when handling volumes
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1444 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-05-23 15:30:34 +00:00
Pierre Ossman
9ee398107e
Add support for SNDCTL_DSP_SETTRIGGER. ( closes #56 )
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1437 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-03-07 09:27:30 +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
4171f2504a
Make sure we report success for SNDCTL_DSP_SETDUPLEX.
...
(Patch by ZlatkO)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1422 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-01-19 08:00:31 +00:00
Pierre Ossman
4c0a481f79
Report IO error on ioctl() when we're in a fatal error state.
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1421 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-01-04 14:20:53 +00:00
Pierre Ossman
c992ed9c47
Free stream objects when they've been invalidated.
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1420 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-01-04 14:17:57 +00:00
Pierre Ossman
19bd9148c5
Fix error messages for failure connecting streams.
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1419 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-01-04 14:06:24 +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
d4ca81fc2e
Fix some missing line breaks.
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1410 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-11-06 13:16:15 +00:00
Pierre Ossman
6ca819354c
The OSS spec is unclear what should happen when a reset is requested. Let's
...
have a nicer attitude and keep as much settings as possible.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1406 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-11-06 10:17:39 +00:00
Pierre Ossman
29ab939570
Stop using x86-isms and use ISO C (oversized shifts are undefined).
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1397 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-09-14 16:00:57 +00:00
Pierre Ossman
5f828c2c3d
Fix debug output for SNDCTL_DSP_SETFRAGMENT.
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1396 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-09-14 14:56:31 +00:00
Lennart Poettering
66ec460845
fix a bogus debug line
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1374 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-09-06 21:37:09 +00:00
Lennart Poettering
6569199778
implement a few more ioctl()s, including a subset of SNDCTL_DSP_GETOPTR. Just enough to make JavaSound work.
...
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1373 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-09-06 19:47:53 +00:00