From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d4db,6053d2b3fdad9034,start X-Google-Attributes: gid10d4db,public X-Google-ArrivalTime: 1993-11-24 11:13:45 PST Path: gmd.de!xlink.net!howland.reston.ans.net!europa.eng.gtefsd.com!uunet!pipex!uknet!EU.net!news.funet.fi!klaava!klaava!not-for-mail From: af1@irz301.inf.tu-dresden.de (Andre Fuechsel) Newsgroups: comp.os.linux.announce Subject: DIFF-FILE: WavPlay 0.21 for snddriv 2.0 Followup-To: comp.os.linux.misc Date: 24 Nov 1993 18:59:32 +0200 Organization: Dresden University of Technology Sender: wirzeniu@klaava.Helsinki.FI Message-ID: <2d03tk$fo@klaava.Helsinki.FI> NNTP-Posting-Host: klaava.helsinki.fi Keywords: WAVplay 021, sound player, sound recorder, snddriv 2.0, diff-file In WavPlay 0.21 I am using the old sound driver. Someone has send me a diff-file so applying this file to recplay.c you will get a working version of WavPlay 0.21 for the new sound driver 2.0. Andre Fuechsel ---------------------- cut here ---------------------------------------- *** recplay.c Wed Oct 20 23:54:45 1993 --- recplay_new.c Wed Nov 24 10:03:04 1993 *************** *** 50,55 **** --- 50,56 ---- int omode; char *audiobuf, *edit_buf_pointer, *point; char string[80]; + int tmp; omode = (mode == PLAY) ? O_WRONLY : O_RDONLY; /* open mode for /dev/audio */ *************** *** 184,190 **** return; } ! abuf_size = ioctl(audio, SNDCTL_DSP_GETBLKSIZE); if (abuf_size < 4096 || abuf_size > 65536) { close(audio); if (abuf_size == -1) { --- 185,191 ---- return; } ! ioctl(audio, SNDCTL_DSP_GETBLKSIZE, &abuf_size); if (abuf_size < 4096 || abuf_size > 65536) { close(audio); if (abuf_size == -1) { *************** *** 195,218 **** return; } exit(-1); ! } if ((audiobuf = malloc(abuf_size)) == NULL) { err(1, "Unable to allocate output buffer"); close(audio); return; } ! ! if (ioctl(audio, SNDCTL_DSP_SAMPLESIZE, data.sample_size)!= ! data.sample_size) { err(1, "Unable to set sample size"); close(audio); return; } ! data.stereo = ioctl(audio, SNDCTL_DSP_STEREO, data.stereo); ! ! if ((data.speed = ioctl(audio, SNDCTL_DSP_SPEED, data.speed)) == -1) { err(1, "Unable to set audio speed"); close(audio); return; --- 196,219 ---- return; } exit(-1); ! } if ((audiobuf = malloc(abuf_size)) == NULL) { err(1, "Unable to allocate output buffer"); close(audio); return; } ! tmp = data.sample_size; ! ioctl(audio, SNDCTL_DSP_SAMPLESIZE, &data.sample_size); ! if ( tmp != data.sample_size) { err(1, "Unable to set sample size"); close(audio); return; } ! ioctl(audio, SNDCTL_DSP_STEREO, &data.stereo); ! ! if (ioctl(audio, SNDCTL_DSP_SPEED, &data.speed) == -1) { err(1, "Unable to set audio speed"); close(audio); return; ---------------------- cut here ---------------------------------------- Sorry, but I could try it out, because I don't use snddriv 2.0 but it should be ok. Andre Fuechsel e-mail: af1@irz.inf.tu-dresden.de -- af1@irz.inf.tu-dresden.de ------------------ * Why not try VMS? * * ... or LINUX? * ------------------ -- Mail submissions for comp.os.linux.announce to: linux-announce@tc.cornell.edu PLEASE remember Keywords: and a short description of the software.