2
.\" Copyright (c) 2005, 4Front Technologies 2005\&.
3
.TH ossddk_adev_set_rates 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services"
5
ossddk_adev_set_rates \- Set the supported sampling rates
9
#include <sys/soundcard.h>
11
#include <sys/ossddk/ossddk.h>
14
\fBvoid\fR ossddk_adev_set_rates(\fBint \fIdev\fP, \fBint \fImin_rate\fP, \fBint \fImax_rate\fP, \fBint \fInrates\fP, \fBint \fIrates[20]\fP);
18
Open Sound System specific (OSS 4.0 DDK)\&.
28
OSS audio device number.
36
The minimum sampling rate supported by the device.
44
The maximum sampling rate supported by the device.
52
Number of discrete rates (0 to 20).
60
Pointer to an array containing up to 20 sampling rates (in ascending order).
65
This function sets meta information that applications may obtain using the
66
\fISNDCTL_AUDIOINFO(2oss)\fR ioctl call. There are three ways how this function can be
67
called. In both cases the min_rate and max_rate parameters must be set properly.
69
1) If the device supports any rates between the minimum and maximum the nrates parameter
70
must be set to 0. The rates parameter can be null.
72
2) If the device supports just few rates (up to 20) you should pass the number of
73
supported rates in \fInrates\fR and pointer to an array (of int) in the \fIrates\fR
74
parameter. Rates stoored in the array must be in increasing order.
76
3) If there are more than 20 possible rates you should set nrates=0 and rates=NULL.
78
The driver can change the supported rate information whenever necessary. For example if
79
a change in device's operating mode changes the supported rates too.
83
\fISNDCTL_AUDIOINFO(2oss)\fR
85
\fIWriting Sound Device Drivers with OSS DDK\fR
87
\fIOpen Sound System Programmer's Guide\fR