mirror of
https://github.com/alsa-project/alsa-tools.git
synced 2025-10-29 05:40:25 -04:00
Fixed against the current library
This commit is contained in:
parent
14cd95618b
commit
98a80c0ef9
1 changed files with 2 additions and 9 deletions
|
|
@ -37,7 +37,6 @@ int output_open(output_t *output)
|
|||
{
|
||||
const char *pcm_name = output->pcm_name;
|
||||
char devstr[128];
|
||||
int card, dev;
|
||||
snd_pcm_hw_params_t *params;
|
||||
snd_pcm_sw_params_t *swparams;
|
||||
snd_pcm_sframes_t buffer_time;
|
||||
|
|
@ -52,22 +51,16 @@ int output_open(output_t *output)
|
|||
* Open the device driver
|
||||
*/
|
||||
if (pcm_name == NULL) {
|
||||
card = snd_defaults_pcm_card();
|
||||
dev = snd_defaults_pcm_device();
|
||||
if (card < 0 || dev < 0) {
|
||||
fprintf(stderr, "defaults are not set\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
switch (output->channels) {
|
||||
case 1:
|
||||
case 2:
|
||||
sprintf(devstr, "default");
|
||||
break;
|
||||
case 4:
|
||||
sprintf(devstr, "surround40:%d,%d", card, dev);
|
||||
strcpy(devstr, "surround40");
|
||||
break;
|
||||
case 6:
|
||||
sprintf(devstr, "surround51:%d,%d", card, dev);
|
||||
strcpy(devstr, "surround51");
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "%d channels are not supported\n", output->channels);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue