Get sound card property
1. API Description
This API is used to get the property of an sound card.
Request mode:
- V2.6.0 and above: POST [ip]/mwapi/V2.0/audio/get-audio-card-mixer
- V2.5.0 and below: POST [ip]/mwapi/get-audio-card-mixer
Administrator Rights | Logged-in |
---|---|
No | Yes |
2. Input Parameters
Name | Required | Type | Description |
---|---|---|---|
card | Yes | Int | The unique identifier for the sound card device, which can be obtained via Get sound card device list |
3. Output Parameters
Name | Type | Description |
---|---|---|
status | Int | Status code |
mixer | Array of CardProperty | Array of sound card properties |
CardProperty
Name | Type | Description |
---|---|---|
name | String | The name of the sound card |
id | Int | The ID of the sound card |
val | Int | The volume, ranging from 0 to 100 |
flag_c | Boolean | Whether it is the capture volume true: Yes; false: No |
flag_p | Boolean | Whether it is the playback volume true: Yes; false: No |
4. Example
Getting the properties of sound card 0.
Input Example
{
"card": 0,
}
Output Example
{
"status": 0,
"mixer": [
{
"name": "Headphone",
"id": 0,
"val": 100,
"flag_c": false,
"flag_p": true
},
{
"name": "Line Gain",
"id": 5,
"val": 100,
"flag_c": false,
"flag_p": true
},
{
"name": "Mic Gain",
"id": 7,
"val": 100,
"flag_c": false,
"flag_p": true
},
{
"name": "Mic",
"id": 14,
"val": 100,
"flag_c": true,
"flag_p": false
},
{
"name": "Line",
"id": 15,
"val": 100,
"flag_c": true,
"flag_p": false
}
]
}
5. Error Code
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
Status | Definition | Description |
---|---|---|
7 | MW_STATUS_INVALID_ARG | Missing required parameters |