Commit Graph

1312 Commits

Author SHA1 Message Date
Peter Åstrand
577fed6a25 libsamplerate requires libm
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1306 423420c4-83ab-492f-b58f-81f9feb106b5
2006-10-30 09:01:01 +00:00
Peter Åstrand
6ac7e0a1be Prevent segfaults in out of memory conditions by checking the pointer returned from XGetImage.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1305 423420c4-83ab-492f-b58f-81f9feb106b5
2006-10-27 12:59:38 +00:00
Peter Åstrand
bcec43cb63 Indent fix
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1304 423420c4-83ab-492f-b58f-81f9feb106b5
2006-10-27 12:58:13 +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
Michael Gernoth
d5725f46d9 small fix to the (still disabled) linear resampler
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1302 423420c4-83ab-492f-b58f-81f9feb106b5
2006-10-26 22:26:16 +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
Peter Åstrand
227fad6d96 Define WITH_RDPSND when using sound
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1300 423420c4-83ab-492f-b58f-81f9feb106b5
2006-10-21 06:36:49 +00:00
Pierre Ossman
e882b6befd Now that the rdpsnp queue functions aren't marked inline, they should be
in proto.h.


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1299 423420c4-83ab-492f-b58f-81f9feb106b5
2006-10-19 12:26:55 +00:00
Pierre Ossman
cf91d83caf Inline functions with external linkage is a gcc-ism and not kosher under C99.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1298 423420c4-83ab-492f-b58f-81f9feb106b5
2006-10-19 11:28:53 +00:00
Pierre Ossman
dd78c23e5e Make sure we get valid return values from the sound backends.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1297 423420c4-83ab-492f-b58f-81f9feb106b5
2006-10-19 11:27:40 +00:00
Peter Åstrand
212d1e57b0 Corrected pkgconfig check for libsamplerate
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1296 423420c4-83ab-492f-b58f-81f9feb106b5
2006-10-18 05:12:30 +00:00
Peter Åstrand
05c587ef64 Using pkgconfig for optional packages: libao, libsamplerate, and ALSA. New option: --enable-static-libsamplerate
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1295 423420c4-83ab-492f-b58f-81f9feb106b5
2006-10-16 12:23:13 +00:00
Michael Gernoth
fb206f958b reset WAVEOUTLEN back to 16 as gui becomes unresponsive with higher values
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1294 423420c4-83ab-492f-b58f-81f9feb106b5
2006-10-14 22:12:47 +00:00
Peter Åstrand
712030924b Undo incorrect commit
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1293 423420c4-83ab-492f-b58f-81f9feb106b5
2006-10-11 17:59:18 +00:00
Peter Åstrand
83817d6160 Changed the Copyright: tag to License: in accordance with RPM 4
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1292 423420c4-83ab-492f-b58f-81f9feb106b5
2006-10-11 17:56:05 +00:00
Michael Gernoth
3701080708 add (disabled) real linear resampler. quality is currently not as good
as previous simpler implementation, but will be improved


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1291 423420c4-83ab-492f-b58f-81f9feb106b5
2006-10-02 08:01:24 +00:00
Michael Gernoth
7b6705553d improve sound quality a bit again
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1290 423420c4-83ab-492f-b58f-81f9feb106b5
2006-10-01 23:42:14 +00:00
Michael Gernoth
188b928bfa rename WAVEOUTBUF to WAVEOUTLEN and increase it to 1024 bytes
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1289 423420c4-83ab-492f-b58f-81f9feb106b5
2006-10-01 22:30:34 +00:00
Michael Gernoth
23ea0a9173 make libao a bit more efficient on big endian
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1288 423420c4-83ab-492f-b58f-81f9feb106b5
2006-10-01 22:27:11 +00:00
Michael Gernoth
101a5557fa convert between different numbers of input and output channels
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1287 423420c4-83ab-492f-b58f-81f9feb106b5
2006-10-01 21:46:38 +00:00
Michael Gernoth
65b4b60bd5 simplify resampling
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1286 423420c4-83ab-492f-b58f-81f9feb106b5
2006-10-01 19:05:30 +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
076221eb15 add missing include
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1284 423420c4-83ab-492f-b58f-81f9feb106b5
2006-10-01 18:22:05 +00:00
Michael Gernoth
cd2ae82e7c sound quality fixes for resampling
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1283 423420c4-83ab-492f-b58f-81f9feb106b5
2006-10-01 17:51:51 +00:00
Michael Gernoth
a8f9e84598 add simple linear resampling implementation to be used when libsamplerate
is not available


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1282 423420c4-83ab-492f-b58f-81f9feb106b5
2006-10-01 17:23:30 +00:00
Michael Gernoth
de56acd493 fix conversion between arbitrary samplerates
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1281 423420c4-83ab-492f-b58f-81f9feb106b5
2006-10-01 15:07:55 +00:00
Michael Gernoth
deace67d29 make it possible to resample 8bit<->16bit soundstreams
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1280 423420c4-83ab-492f-b58f-81f9feb106b5
2006-10-01 14:31:09 +00:00
Michael Gernoth
cf46d01317 add missing space in libsamplerate description
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1279 423420c4-83ab-492f-b58f-81f9feb106b5
2006-10-01 14:05:15 +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
8129a2d373 use libsamplerate for resampling when available
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1277 423420c4-83ab-492f-b58f-81f9feb106b5
2006-10-01 13:57:34 +00:00
Michael Gernoth
8f8ea57234 only resample when there is need
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1276 423420c4-83ab-492f-b58f-81f9feb106b5
2006-10-01 12:26:01 +00:00
Michael Gernoth
b7b4327927 move simple resample algorithm from rdpsnd_libao.c to rdpsnd_dsp.c to
provide a base for a better resample-algorithm


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1275 423420c4-83ab-492f-b58f-81f9feb106b5
2006-10-01 12:16:50 +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
bc3c75e4dc make rdpsnd_auto_open and rdpsnd_register_drivers static
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1273 423420c4-83ab-492f-b58f-81f9feb106b5
2006-10-01 11:00:03 +00:00
Michael Gernoth
5594a05572 let 'make proto' generate correct prototypes for rdpsnd
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1272 423420c4-83ab-492f-b58f-81f9feb106b5
2006-10-01 10:56:39 +00:00
Michael Gernoth
6e6853dff8 move sound-driver selection code in rdpsnd_init
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1271 423420c4-83ab-492f-b58f-81f9feb106b5
2006-09-21 19:00:11 +00:00
Michael Gernoth
162bc366b3 handle missing audio-drivers better
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1270 423420c4-83ab-492f-b58f-81f9feb106b5
2006-09-18 21:42:50 +00:00
Michael Gernoth
1ee09f6688 replace constants with their define
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1269 423420c4-83ab-492f-b58f-81f9feb106b5
2006-09-18 10:20:02 +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
c66055ab22 do not segfault when no libao default-driver is defined
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1267 423420c4-83ab-492f-b58f-81f9feb106b5
2006-09-18 09:34:34 +00:00
Michael Gernoth
7522bc310c indent fixes
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1266 423420c4-83ab-492f-b58f-81f9feb106b5
2006-09-18 09:28:42 +00:00
Michael Gernoth
4d7ffa4faa make it possible to select libao output driver
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1265 423420c4-83ab-492f-b58f-81f9feb106b5
2006-09-18 09:27:58 +00:00
Michael Gernoth
c4b90c2072 Recover missing 4 bytes in audio-stream thanks to a hint in an old
email from Robert Sanders <esquimaux73@mailblocks.com>:

I found a trick that seems to solve this.  Basically, I copy the last
4 bytes of the RDPSND_WRITE command that precedes the sample data.
It's not being used by anything else.  I can't tell whether this is
some trick to "pre-load" the sample buffer, or some error in
rdesktop's interpretation of the RDP sound protocol.


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1264 423420c4-83ab-492f-b58f-81f9feb106b5
2006-09-17 20:06:37 +00:00
Michael Gernoth
f80ca3e60e change probe-order for OSS and SUN around
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1263 423420c4-83ab-492f-b58f-81f9feb106b5
2006-09-17 19:08:14 +00:00
Michael Gernoth
4c83a35b48 call rdpsnd_dsp_process from a better place
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1262 423420c4-83ab-492f-b58f-81f9feb106b5
2006-09-17 18:08:51 +00:00
Michael Gernoth
45cc3f12f4 use correct types in rdpsnd_dsp_softvol
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1261 423420c4-83ab-492f-b58f-81f9feb106b5
2006-09-17 15:49:14 +00:00
Michael Gernoth
306a72ffe9 use software volume for ALSA
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1260 423420c4-83ab-492f-b58f-81f9feb106b5
2006-09-17 15:33:29 +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
8d590a7ba3 softvol only needs one buffer
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1258 423420c4-83ab-492f-b58f-81f9feb106b5
2006-09-17 15:08:48 +00:00
Michael Gernoth
76459e4005 add software volume control (currently only for libao but will be
used for alsa, too)


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1257 423420c4-83ab-492f-b58f-81f9feb106b5
2006-09-17 14:41:16 +00:00