# HG changeset patch # User vins # Date 1179595290 0 # Node ID d240e1ef53565511413471839e1f28fc5bf12bf6 # Parent 23a3a480945bd5470e31d98cf2d4f40de63078c4 [xemacs-hg @ 2007-05-19 17:21:29 by vins] Fix crash when playing sound on 64-bit linux systems under native sound. diff -r 23a3a480945b -r d240e1ef5356 src/ChangeLog --- a/src/ChangeLog Fri May 18 21:51:18 2007 +0000 +++ b/src/ChangeLog Sat May 19 17:21:30 2007 +0000 @@ -1,3 +1,8 @@ +2007-05-17 Vin Shelton + + * linuxplay.c (linux_play_data_or_file): Fix playing sound on + 64-bit linux. Pathc from Hans de Graaff. + 2007-05-18 Stephen J. Turnbull * config.h.in (ERROR_CHECK_BYTE_CODE): Alphabetize ERROR_CHECK_*. diff -r 23a3a480945b -r d240e1ef5356 src/linuxplay.c --- a/src/linuxplay.c Fri May 18 21:51:18 2007 +0000 +++ b/src/linuxplay.c Sat May 19 17:21:30 2007 +0000 @@ -323,8 +323,8 @@ device; repeat until all data has been processed */ rrtn = length; do { - for (pptr = data; (prtn = parsesndfile(&pptr,(size_t *)&rrtn,&optr)) > 0; ) - for (cptr = optr; (crtn = sndcnv(&cptr,(size_t *) &prtn,&sptr)) > 0; ) { + for (pptr = data; (prtn = parsesndfile(&pptr,&rrtn,&optr)) > 0; ) + for (cptr = optr; (crtn = sndcnv(&cptr,&prtn,&sptr)) > 0; ) { for (;;) { if ((wrtn = write(audio_fd,sptr,crtn)) < 0) { sound_perror("write"); goto END_OF_PLAY; }