Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142513401
D54038.id167441.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
645 B
Referenced Files
None
Subscribers
None
D54038.id167441.diff
View Options
diff --git a/share/examples/sound/oss.h b/share/examples/sound/oss.h
--- a/share/examples/sound/oss.h
+++ b/share/examples/sound/oss.h
@@ -112,8 +112,13 @@
}
/* Set sample format */
- if (ioctl(config->fd, SNDCTL_DSP_SETFMT, &config->format) < 0)
+ tmp = config->format;
+ if (ioctl(config->fd, SNDCTL_DSP_SETFMT, &tmp) < 0)
err(1, "Unable to set sample format");
+ if (tmp != config->format)
+ errx(1, "Unable to set sample format to %d."
+ "Check if you can set format to s32le with sndctl.\n",
+ config->format);
/* Set sample channels */
if (ioctl(config->fd, SNDCTL_DSP_CHANNELS, &config->audio_info.max_channels) < 0)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jan 21, 1:14 PM (2 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26546971
Default Alt Text
D54038.id167441.diff (645 B)
Attached To
Mode
D54038: sound examples: Check if setting property was successful
Attached
Detach File
Event Timeline
Log In to Comment