Changeset 3738:791afc7d0aa4 in roaraudio


Ignore:
Timestamp:
04/26/10 14:56:48 (14 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

cleanup, use control connection

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/alsa/pcm.c

    r3736 r3738  
    4848  return 0; 
    4949 
    50  if ( roar_vio_simple_stream( &(self->stream_vio), self->info.rate, 
    51                         self->info.channels, self->info.bits, self->info.codec, 
    52                         NULL, ROAR_DIR_PLAY, "ALSA plugin" ) == -1 ) { 
     50 if ( roar_vio_simple_new_stream_obj(&(self->stream_vio), &(self->roar.con), &(self->stream), 
     51                                     self->info.rate, self->info.channels, self->info.bits, self->info.codec, 
     52                                     io->stream == SND_PCM_STREAM_PLAYBACK ? ROAR_DIR_PLAY : ROAR_DIR_MONITOR 
     53                                    ) == -1 ) { 
    5354  return -EINVAL; 
    5455 } 
     
    138139} 
    139140 
    140 static int roar_pcm_dummy (snd_pcm_ioplug_t * io) { 
    141  ROAR_DBG("roar_pcm_dummy(*) = 0"); 
    142  return 0; 
    143 } 
    144  
    145141 
    146142/////////////////////////////// 
     
    208204 
    209205static int roar_pcm_prepare(snd_pcm_ioplug_t *io) { 
    210  struct roar_alsa_pcm * self = io->private_data; 
    211  
    212206 ROAR_DBG("roar_pcm_prepare(*) = ?"); 
    213207 
    214208 return roar_pcm_start(io); 
    215  
    216 #if 0 
    217  if ( self->stream_opened ) { 
    218   roar_vio_close(&(self->stream_vio)); 
    219   self->stream_opened = 0; 
    220  } 
    221  
    222  if ( roar_vio_simple_new_stream_obj(&(self->stream_vio), &(self->roar.con), &(self->stream), 
    223                                      self->info.rate, self->info.channels, self->info.bits, self->info.codec, 
    224                                      io->stream == SND_PCM_STREAM_PLAYBACK ? ROAR_DIR_PLAY : ROAR_DIR_MONITOR 
    225                                     ) == -1 ) { 
    226   return -EINVAL; 
    227  } 
    228  
    229  self->stream_opened = 1; 
    230  
    231  ROAR_DBG("roar_pcm_prepare(*) = 0"); 
    232  return 0; 
    233 #endif 
    234209} 
    235210 
Note: See TracChangeset for help on using the changeset viewer.