Changeset View
Changeset View
Standalone View
Standalone View
lib/libmixer/mixer.3
Show All 16 Lines | |||||
.\" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | .\" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||||
.\" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | .\" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||||
.\" OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | .\" OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||||
.\" THE SOFTWARE. | .\" THE SOFTWARE. | ||||
.\" | .\" | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd March 19, 2022 | .Dd January 19, 2023 | ||||
markj: You should bump this date too. | |||||
.Dt MIXER 3 | .Dt MIXER 3 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm mixer_open , | .Nm mixer_open , | ||||
.Nm mixer_close , | .Nm mixer_close , | ||||
.Nm mixer_get_dev , | .Nm mixer_get_dev , | ||||
.Nm mixer_get_dev_byname , | .Nm mixer_get_dev_byname , | ||||
.Nm mixer_add_ctl , | .Nm mixer_add_ctl , | ||||
▲ Show 20 Lines • Show All 69 Lines • ▼ Show 20 Lines | |||||
The | The | ||||
.Nm mixer | .Nm mixer | ||||
library allows userspace programs to access and manipulate OSS sound mixers in | library allows userspace programs to access and manipulate OSS sound mixers in | ||||
a simple way. | a simple way. | ||||
.Ss Mixer | .Ss Mixer | ||||
A mixer is described by the following structure: | A mixer is described by the following structure: | ||||
.Bd -literal | .Bd -literal | ||||
struct mixer { | struct mixer { | ||||
TAILQ_HEAD(, mix_dev) devs; /* device list */ | TAILQ_HEAD(mix_devhead, mix_dev) devs; /* device list */ | ||||
struct mix_dev *dev; /* selected device */ | struct mix_dev *dev; /* selected device */ | ||||
oss_mixerinfo mi; /* mixer info */ | oss_mixerinfo mi; /* mixer info */ | ||||
oss_card_info ci; /* audio card info */ | oss_card_info ci; /* audio card info */ | ||||
char name[NAME_MAX]; /* mixer name (e.g /dev/mixer0) */ | char name[NAME_MAX]; /* mixer name (e.g /dev/mixer0) */ | ||||
int fd; /* file descriptor */ | int fd; /* file descriptor */ | ||||
int unit; /* audio card unit */ | int unit; /* audio card unit */ | ||||
int ndev; /* number of devices */ | int ndev; /* number of devices */ | ||||
int devmask; /* supported devices */ | int devmask; /* supported devices */ | ||||
▲ Show 20 Lines • Show All 87 Lines • ▼ Show 20 Lines | |||||
#define MIX_VOLMIN 0.0f | #define MIX_VOLMIN 0.0f | ||||
#define MIX_VOLMAX 1.0f | #define MIX_VOLMAX 1.0f | ||||
#define MIX_VOLNORM(v) ((v) / 100.0f) | #define MIX_VOLNORM(v) ((v) / 100.0f) | ||||
#define MIX_VOLDENORM(v) ((int)((v) * 100.0f + 0.5f)) | #define MIX_VOLDENORM(v) ((int)((v) * 100.0f + 0.5f)) | ||||
float left; /* left volume */ | float left; /* left volume */ | ||||
float right; /* right volume */ | float right; /* right volume */ | ||||
} vol; | } vol; | ||||
int nctl; /* number of controls */ | int nctl; /* number of controls */ | ||||
TAILQ_HEAD(, mix_ctl) ctls; /* control list */ | TAILQ_HEAD(mix_ctlhead, mix_ctl) ctls; /* control list */ | ||||
TAILQ_ENTRY(mix_dev) devs; | TAILQ_ENTRY(mix_dev) devs; | ||||
}; | }; | ||||
.Ed | .Ed | ||||
.Pp | .Pp | ||||
The fields are follows: | The fields are follows: | ||||
.Bl -tag -width "parent_mixer" | .Bl -tag -width "parent_mixer" | ||||
.It Fa parent_mixer | .It Fa parent_mixer | ||||
Pointer to the mixer the device is attached to. | Pointer to the mixer the device is attached to. | ||||
▲ Show 20 Lines • Show All 329 Lines • Show Last 20 Lines |
You should bump this date too.