25 lines
753 B
Plaintext
25 lines
753 B
Plaintext
$OpenBSD: patch-flow_audioiooss_cc,v 1.2 2008/03/25 11:45:08 espie Exp $
|
|
--- flow/audioiooss.cc.orig Wed Feb 13 10:35:23 2008
|
|
+++ flow/audioiooss.cc Sun Mar 16 13:49:53 2008
|
|
@@ -186,6 +186,20 @@ bool AudioIOOSS::open()
|
|
artsdebug("device capabilities: revision%d %s",
|
|
device_caps & DSP_CAP_REVISION, caps.c_str());
|
|
|
|
+ if((param(direction) == 3) && (device_caps & DSP_CAP_DUPLEX))
|
|
+ {
|
|
+ int duplex = 1;
|
|
+ if(ioctl(audio_fd,SNDCTL_DSP_SETDUPLEX,&duplex) == -1)
|
|
+ {
|
|
+ _error = "SNDCTL_DSP_SETDUPLEX failed - ";
|
|
+ _error += strerror(errno);
|
|
+
|
|
+ close();
|
|
+ return false;
|
|
+ }
|
|
+
|
|
+ }
|
|
+
|
|
int requestedFormat = (_format == 8)?AFMT_U8:AFMT_S16_LE;
|
|
int gotFormat = requestedFormat;
|
|
if (ioctl(audio_fd, SNDCTL_DSP_SETFMT, &gotFormat)==-1)
|