Changeset 5168:38e69b0d26e0 in roaraudio for plugins/alsa
- Timestamp:
- 10/18/11 12:24:42 (13 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- plugins/alsa
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/alsa/pcm_roar.c
r5167 r5168 60 60 } 61 61 62 if ( self->stream_role != ROAR_ROLE_UNKNOWN ) { 63 if ( roar_stream_set_role(&(self->roar.con), &(self->stream), self->stream_role) == -1 ) { 64 ROAR_WARN("roar_pcm_start(*): Can not set stream role: %i: %s", self->stream_role, roar_error2str(roar_error)); 65 } 66 } 67 62 68 if ( roar_vio_ctl(&(self->stream_vio), 63 69 io->stream == SND_PCM_STREAM_PLAYBACK ? ROAR_VIO_CTL_GET_SELECT_WRITE_FH : … … 415 421 const char * para; 416 422 const char * server = NULL; 423 const char * tmp; 424 int role = ROAR_ROLE_UNKNOWN; 417 425 int ret; 418 426 … … 431 439 if ( !strcmp(para, "server") ) { 432 440 if (snd_config_get_string(n, &server) < 0) { 441 return -EINVAL; 442 } 443 } else if ( !strcmp(para, "role") ) { 444 if (snd_config_get_string(n, &tmp) < 0) { 445 return -EINVAL; 446 } 447 if ( (role = roar_str2role(tmp)) == -1 ) { 433 448 return -EINVAL; 434 449 } … … 444 459 445 460 memset(self, 0, sizeof(struct roar_alsa_pcm)); 461 462 self->stream_role = role; 446 463 447 464 errno = ENOSYS; -
plugins/alsa/roar.h
r5157 r5168 59 59 struct roar_stream stream; 60 60 struct roar_vio_calls stream_vio; 61 int stream_role; 61 62 int stream_opened; 62 63 size_t writec;
Note: See TracChangeset
for help on using the changeset viewer.