Pierre Ossman
25b8412333
Avoid poking around in STREAM internals
...
It's easy to make mistakes this way, and bypassed the normal bounds
checking. So make sure we always use macros or functions.
2019-05-06 14:33:38 +02:00
Pierre Ossman
489c43f382
Return STREAM objects from data generating functions
...
Use a consistent style of returning a new STREAM object from functions
that output data, rather than requiring an existing structure to be
passed in. This generally makes the memory management more straight
forward and allows us to do more proper bounds checking of everything.
This also adds some new STREAM macros to make it easier to manage
them without poking around in the internal structure.
2019-05-06 14:33:11 +02:00
Pierre Ossman
6268b44f06
Add macro to check remaining length of STREAM
...
Avoids poking around in the internals, and also makes the code
easier to read.
2019-05-06 14:33:05 +02:00
Henrik Andersson
896a923f55
Markup unused parameters
2017-10-20 11:05:52 +02:00
Henrik Andersson
87d8d123b8
Rework the logging system
...
This commit will add a logging system to solve the problem that
one actually need to recompile rdesktop from source to enable
different debug logging.
- Same logging api for all kind of logging and messages to
end user.
- Adding -v for verbose output when running rdesktop.
- All messages are logged into a subject and with a type, eg:
logger(Keyboard, Notice, "Autos-electing %s based on locale.", locale);
- Debug logging is enabled trough a environment variable RDEKSTOP_DEBUG,
which specifies subjects of interest, comma separated. There is a special
subject named All which includes all subject for debug loggin. There is also
a simple logic opeartor '!' = NOT which can be used in combination like:
RDESKTOP_DEBUG=All,!Graphics,!Sound
Which would give debug log output for All subject except Graphics and Sound.
2017-01-26 14:19:40 +01:00
Henrik Andersson
51c17488a7
run of indent-all
...
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1679 423420c4-83ab-492f-b58f-81f9feb106b5
2012-11-22 07:57:26 +00:00
Peter Åstrand
5cb7910413
Indented with indent-all.
...
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1670 423420c4-83ab-492f-b58f-81f9feb106b5
2012-10-23 11:38:27 +00:00
Peter Åstrand
b47063c74f
Consistent formatting of emails in copyright headers.
...
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1616 423420c4-83ab-492f-b58f-81f9feb106b5
2011-04-13 11:28:19 +00:00
Peter Åstrand
b638882347
Include emails in copyright statements.
...
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1615 423420c4-83ab-492f-b58f-81f9feb106b5
2011-04-13 11:13:04 +00:00
Peter Åstrand
27068f53f8
Updated the copyright notices for the things we have been working on.
...
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1612 423420c4-83ab-492f-b58f-81f9feb106b5
2011-04-13 08:55:42 +00:00
Henrik Andersson
66c9092910
Fixed indentation.
...
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1608 423420c4-83ab-492f-b58f-81f9feb106b5
2011-01-03 13:14:50 +00:00
Peter Åstrand
281d7c9f06
Changed license to GPLv3
...
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1534 423420c4-83ab-492f-b58f-81f9feb106b5
2010-01-12 08:31:06 +00:00
Peter Åstrand
d87e27483f
Reworked device opening, only open the device with the access that we
...
currently needs. Avoids transmitting recording data on playback with padsp.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1480 423420c4-83ab-492f-b58f-81f9feb106b5
2008-10-02 18:21:58 +00:00
Peter Åstrand
edbae085f1
Everything except oss_register can be static
...
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1479 423420c4-83ab-492f-b58f-81f9feb106b5
2008-10-02 09:48:20 +00:00
Jay Sorg
88855ddcbf
update the copyright year
...
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1474 423420c4-83ab-492f-b58f-81f9feb106b5
2008-07-11 03:51:23 +00:00
Jay Sorg
4b80c655db
remove g++ errors and warnings
...
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1381 423420c4-83ab-492f-b58f-81f9feb106b5
2007-01-18 05:42:11 +00:00
Pierre Ossman
95c21876c1
A bit more robust handling on read() or write() errors.
...
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1375 423420c4-83ab-492f-b58f-81f9feb106b5
2007-01-10 09:15:15 +00:00
Jay Sorg
6091381a81
prefix BOOL with RD_
...
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1371 423420c4-83ab-492f-b58f-81f9feb106b5
2007-01-08 04:47:06 +00:00
Jay Sorg
797df4fa02
copyright year update
...
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1364 423420c4-83ab-492f-b58f-81f9feb106b5
2007-01-04 05:39:39 +00:00
Jay Sorg
b670bdacfa
RD_ prefix and win32 compatibility for core files
...
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1363 423420c4-83ab-492f-b58f-81f9feb106b5
2007-01-04 04:55:56 +00:00
Pierre Ossman
b05c6e25d1
Add capture support to the oss backend.
...
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1360 423420c4-83ab-492f-b58f-81f9feb106b5
2007-01-02 16:37:54 +00:00
Pierre Ossman
f0c0188404
Fix audio_driver initialisation to avoid problem with uninitialised
...
variables and reduce the memory leakage.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1355 423420c4-83ab-492f-b58f-81f9feb106b5
2007-01-02 11:39:56 +00:00
Michael Gernoth
2086e83814
Make code compile with C89 compilers again
...
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1350 423420c4-83ab-492f-b58f-81f9feb106b5
2006-12-24 13:53:23 +00:00
Pierre Ossman
c6712a8945
Abstract select() handling in rdpsnd so that backends can do their thing
...
more correctly.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1345 423420c4-83ab-492f-b58f-81f9feb106b5
2006-12-07 15:23:45 +00:00
Pierre Ossman
139e42d9ef
Restructure driver registration structures a bit so it is easier to add
...
new fields (and also reduce some memory usage/leaks).
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1344 423420c4-83ab-492f-b58f-81f9feb106b5
2006-12-07 11:54:29 +00:00
Peter Åstrand
05d7a550b1
After closing g_dsp_fd, set g_dsp_busy to false. This prevents errors of type: ERROR: select: Bad file descriptor
...
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1317 423420c4-83ab-492f-b58f-81f9feb106b5
2006-11-02 11:55:59 +00:00
Pierre Ossman
22d88645ff
Rewrite the queue management a bit so that blocks are not completed until
...
they have finished playing. This also makes the queue system mandatory for
all backends.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1301 423420c4-83ab-492f-b58f-81f9feb106b5
2006-10-26 09:47:17 +00:00
Michael Gernoth
26e10728e8
use resampling in OSS driver when native samplerate is not available
...
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1285 423420c4-83ab-492f-b58f-81f9feb106b5
2006-10-01 18:47:04 +00:00
Michael Gernoth
e82b81576b
make it possible for the driver to switch resampling on and off
...
dynamically. this will be needed for the OSS driver.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1278 423420c4-83ab-492f-b58f-81f9feb106b5
2006-10-01 14:03:43 +00:00
Michael Gernoth
80ab25c473
do not lose the first mixer event in oss
...
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1274 423420c4-83ab-492f-b58f-81f9feb106b5
2006-10-01 11:08:09 +00:00
Michael Gernoth
d8d445f63d
fall back to software volume control when the mixer ioctl fails on the
...
dsp fd
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1268 423420c4-83ab-492f-b58f-81f9feb106b5
2006-09-18 10:17:24 +00:00
Michael Gernoth
7ef82f75c7
unify audio-byteswapping as a dsp-function
...
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1259 423420c4-83ab-492f-b58f-81f9feb106b5
2006-09-17 15:25:10 +00:00
Michael Gernoth
99afd6a9f1
fix SunCC errors/warnings and configure-variable-usage (LIBS/LDFLAGS)
...
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1255 423420c4-83ab-492f-b58f-81f9feb106b5
2006-09-17 11:42:22 +00:00
Michael Gernoth
07b5b9e41c
allow multiple sound-drivers to be compiled in simultaneously and
...
make the runtime selectable
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1254 423420c4-83ab-492f-b58f-81f9feb106b5
2006-09-17 11:04:50 +00:00
Michael Gernoth
ec4862937f
unify queue-handling in rdpsnd.c (remove private copies from all
...
drivers)
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1253 423420c4-83ab-492f-b58f-81f9feb106b5
2006-09-17 10:32:18 +00:00
Michael Gernoth
3a7eeda4e8
Fix high cpu-usage in OSS-driver
...
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1246 423420c4-83ab-492f-b58f-81f9feb106b5
2006-07-12 09:57:05 +00:00
Peter Åstrand
42970a8216
Make rdpsnd_oss work with Esound again, even with largefile enabled: build this compilation unit without largefile support.
...
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1226 423420c4-83ab-492f-b58f-81f9feb106b5
2006-04-13 07:37:24 +00:00
Peter Åstrand
72055744b9
Created a common xstrdup function.
...
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@973 423420c4-83ab-492f-b58f-81f9feb106b5
2005-08-04 12:50:15 +00:00
Peter Åstrand
1320755f2b
Added missing c-basic-offset:s and license headers
...
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@962 423420c4-83ab-492f-b58f-81f9feb106b5
2005-08-03 10:56:16 +00:00
Peter Åstrand
881f0fe93e
Indent fixes
...
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@800 423420c4-83ab-492f-b58f-81f9feb106b5
2004-11-23 13:29:12 +00:00
Michael Gernoth
4ad6d8d4e0
strdup the audio-device
...
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@793 423420c4-83ab-492f-b58f-81f9feb106b5
2004-11-03 10:05:02 +00:00
Michael Gernoth
3f3d20552e
fix for uninitialized ioctl pointer.
...
This could be the cause for hangs with esddsp
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@792 423420c4-83ab-492f-b58f-81f9feb106b5
2004-11-03 09:57:48 +00:00
Jay Sorg
966684035b
changes to compile with g++
...
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@777 423420c4-83ab-492f-b58f-81f9feb106b5
2004-10-03 20:19:51 +00:00
Michael Gernoth
db0476bef3
much better playback with non-broken oss-drivers
...
no change for broken drivers...
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@760 423420c4-83ab-492f-b58f-81f9feb106b5
2004-09-03 22:35:08 +00:00
Michael Gernoth
ee5f4b0a7a
fix for esddsp, which does not implement the SNDCTL_DSP_CHANNELS ioctl
...
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@759 423420c4-83ab-492f-b58f-81f9feb106b5
2004-09-03 18:04:48 +00:00
Michael Gernoth
5632b932bc
oss sound fixes
...
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@752 423420c4-83ab-492f-b58f-81f9feb106b5
2004-08-23 11:13:50 +00:00
Michael Gernoth
cd8b3b6e3e
add $AUDIODEV support to oss-driver
...
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@750 423420c4-83ab-492f-b58f-81f9feb106b5
2004-08-13 09:43:31 +00:00
Peter Åstrand
ed2d6084ed
Indent fixes
...
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@531 423420c4-83ab-492f-b58f-81f9feb106b5
2003-10-29 14:14:46 +00:00
Michael Gernoth
aa78fcc1b4
fix for oss-driver (too fast acks)
...
some g_ prefixes for globals
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@509 423420c4-83ab-492f-b58f-81f9feb106b5
2003-10-23 11:11:31 +00:00
Michael Gernoth
a1b061098d
Mixer fallback for broken sound-drivers
...
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@508 423420c4-83ab-492f-b58f-81f9feb106b5
2003-10-22 12:16:03 +00:00