Commit Graph

47 Commits

Author SHA1 Message Date
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
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
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
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
Peter Åstrand
42abc7d5b2 Corrected last patch; rdpsnd_dsp_resample_set is not needed, since we perform the duplication ourselves.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1470 423420c4-83ab-492f-b58f-81f9feb106b5
2008-04-25 11:17:21 +00:00
Peter Åstrand
fced134989 Workaround to support recording on Sun Ray x86 systems.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1469 423420c4-83ab-492f-b58f-81f9feb106b5
2008-04-24 15:11:17 +00:00
Pierre Ossman
3c70034691 Properly store the current device settings for full duplex operation.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1432 423420c4-83ab-492f-b58f-81f9feb106b5
2008-02-08 10:40:56 +00:00
Pierre Ossman
05836bf86c Fondle the device a bit more carefully when recording to guarantee that we
properly sync up with the data stream. This is crucial to get reliable
behaviour on multi-byte frames.


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1431 423420c4-83ab-492f-b58f-81f9feb106b5
2008-02-08 10:36:28 +00:00
Pierre Ossman
5f90d7f9f0 Record support for Sun audio backend. Also do some general improvements and
get it more in line with the OSS backend.


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1427 423420c4-83ab-492f-b58f-81f9feb106b5
2008-01-22 10:42:55 +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
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
Michael Gernoth
7448875078 fix sun audio driver
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1346 423420c4-83ab-492f-b58f-81f9feb106b5
2006-12-07 16:41:58 +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
Pierre Ossman
d9dbd38cfe Fix some remaining references to rdpsnd_send_completion().
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1303 423420c4-83ab-492f-b58f-81f9feb106b5
2006-10-27 12:29:05 +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
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
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
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
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
06e4ea81a9 Correctly init the audio-info structure. Fixes playback-hangs on
OpenBSD after changing volume.


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@771 423420c4-83ab-492f-b58f-81f9feb106b5
2004-09-11 19:17:48 +00:00
Michael Gernoth
8308616779 use ifdef to see if we are big-endian
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@693 423420c4-83ab-492f-b58f-81f9feb106b5
2004-05-07 12:01:53 +00:00
Michael Gernoth
e0897748b8 Use AUDIO_FLUSH on the BSDs
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@560 423420c4-83ab-492f-b58f-81f9feb106b5
2003-12-11 15:07:04 +00:00
Michael Gernoth
33c294acd4 Use stropts.h on solaris
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@559 423420c4-83ab-492f-b58f-81f9feb106b5
2003-12-11 14:59:54 +00:00
Michael Gernoth
4cc35816cb Removed timezone stuff, due to too much portability problems...
Will solve this later
Portability "fix" for rdpsnd_sun.c on openbsd


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@558 423420c4-83ab-492f-b58f-81f9feb106b5
2003-12-11 12:25:38 +00:00
Michael Gernoth
cd80e92281 Be more portable to platforms where I_FLUSH && FLUSHW are not defined
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@537 423420c4-83ab-492f-b58f-81f9feb106b5
2003-10-31 09:38:25 +00:00
Matt Chapman
85d4ff2a21 AUDIO_CHANNELS_MONO/AUDIO_CHANNELS_STEREO not defined in some versions
of Solaris.


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@513 423420c4-83ab-492f-b58f-81f9feb106b5
2003-10-28 02:33:52 +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
62c180be72 Make sure that g_dsp_busy is initialized to False
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@503 423420c4-83ab-492f-b58f-81f9feb106b5
2003-10-19 11:59:41 +00:00
Peter Åstrand
3a323bbcc1 Fixed indentation
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@498 423420c4-83ab-492f-b58f-81f9feb106b5
2003-10-15 14:01:32 +00:00
Michael Gernoth
5d67a3e036 Volume control for OSS & SUN
Ignore first 4 bytes of audio-packet (clicking noise)


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@490 423420c4-83ab-492f-b58f-81f9feb106b5
2003-10-13 16:09:45 +00:00
Matt Chapman
35d5c8dcbb Updates to Sun audio support (from Michael Gernoth).
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@476 423420c4-83ab-492f-b58f-81f9feb106b5
2003-10-04 12:24:56 +00:00
Matt Chapman
5b021f9561 Add Sun audio support, fix a bug in the OSS driver.
(Michael Gernoth <michael@gernoth.net>)


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@475 423420c4-83ab-492f-b58f-81f9feb106b5
2003-10-04 00:03:24 +00:00