* DIFF-FILE: WavPlay 0.21 for snddriv 2.0
@ 1993-11-24 16:59 Andre Fuechsel
0 siblings, 0 replies; only message in thread
From: Andre Fuechsel @ 1993-11-24 16:59 UTC (permalink / raw)
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.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1993-11-24 16:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1993-11-24 16:59 DIFF-FILE: WavPlay 0.21 for snddriv 2.0 Andre Fuechsel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox