Changeset 3213:da8251c98c0a in roaraudio


Ignore:
Timestamp:
01/24/10 05:41:59 (10 years ago)
Author:
phi
Branch:
default
Message:

support to transpher mixer stream id

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • include/libroar/stream.h

    r2950 r3213  
    8484 uint_least32_t delay; 
    8585 int state; 
     86 int mixer; 
    8687}; 
    8788 
  • libroar/stream.c

    r3136 r3213  
    392392 
    393393 memset(info, 0, sizeof(struct roar_stream_info)); 
     394 info->mixer = -1; 
    394395 
    395396 info->block_size     = data[2]; 
     
    411412 } else { 
    412413  info->flags        |= ((uint32_t)data[9]) << 16; 
     414 } 
     415 
     416 if ( m.datalen < 11*2 ) { 
     417  return 0; 
     418 } else { 
     419  info->mixer         = data[10]; 
    413420 } 
    414421 
  • roarclients/roarctl.c

    r3211 r3213  
    372372 
    373373    if ( g_verbose > 1 ) 
     374     printf("Stream mixer          : %i\n",   info.mixer); 
     375 
     376    if ( g_verbose > 1 ) 
    374377     printf("Stream state          : %s\n",   roar_streamstate2str(info.state)); 
    375378 
  • roard/include/streams.h

    r3042 r3213  
    8383 struct roar_vio_calls jumbo; 
    8484 struct roar_vio_calls * viop; 
     85 int mixer_stream; 
    8586} * g_streams[ROAR_STREAMS_MAX]; 
    8687 
     
    99100int streams_set_dir    (int id, int dir, int defaults); 
    100101int streams_get_dir    (int id); 
     102 
     103int streams_set_mixer_stream(int id, int mixer); 
     104int streams_get_mixer_stream(int id, int mixer); 
    101105 
    102106int streams_get_subsys (int id); 
  • roard/req.c

    r2952 r3213  
    595595    audio_info = &(s->info); 
    596596 
    597     mes->datalen = 2*10; 
    598  
    599     d[2] = ROAR_OUTPUT_CALC_OUTBUFSIZE(audio_info); 
    600     d[3] = ss->pre_underruns; 
    601     d[4] = ss->post_underruns; 
    602     d[5] = ss->codec_orgi; 
    603     d[6] = (ss->flags & 0xFFFF) | (ss->primary ? ROAR_FLAG_PRIMARY : 0) | (ss->driver_id != -1 ? ROAR_FLAG_OUTPUT : 0); 
    604     d[7] = ss->delay/1000; 
    605     d[8] = ss->state; 
    606     d[9] = (ss->flags & 0xFFFF0000) >> 16; 
     597    mes->datalen = 2*11; 
     598 
     599    d[ 2] = ROAR_OUTPUT_CALC_OUTBUFSIZE(audio_info); 
     600    d[ 3] = ss->pre_underruns; 
     601    d[ 4] = ss->post_underruns; 
     602    d[ 5] = ss->codec_orgi; 
     603    d[ 6] = (ss->flags & 0xFFFF) | (ss->primary ? ROAR_FLAG_PRIMARY : 0) | (ss->driver_id != -1 ? ROAR_FLAG_OUTPUT : 0); 
     604    d[ 7] = ss->delay/1000; 
     605    d[ 8] = ss->state; 
     606    d[ 9] = (ss->flags & 0xFFFF0000) >> 16; 
     607    d[10] = ss->mixer_stream; 
    607608 
    608609    ROAR_DBG("req_on_get_stream_para(*): ss->driver_id=%i", ss->driver_id); 
  • roard/streams.c

    r3212 r3213  
    105105   s->outputbuffer    = NULL; 
    106106   s->prethru         = NULL; 
     107   s->mixer_stream    = -1; 
    107108 
    108109   s->mixer.scale     = 65535; 
     
    325326} 
    326327 
     328int streams_set_mixer_stream(int id, int mixer) { 
     329 struct roar_stream_server * ss; 
     330 
     331 _CHECK_SID(id); 
     332 
     333 if ( (ss = g_streams[id]) == NULL ) 
     334  return -1; 
     335 
     336 ss->mixer_stream = mixer; 
     337 
     338 return 0; 
     339} 
     340 
     341int streams_get_mixer_stream(int id, int mixer) { 
     342 struct roar_stream_server * ss; 
     343 
     344 _CHECK_SID(id); 
     345 
     346 if ( (ss = g_streams[id]) == NULL ) 
     347  return -1; 
     348 
     349 return ss->mixer_stream; 
     350} 
     351 
    327352int streams_get_subsys (int id) { 
    328353 struct roar_stream_server * ss; 
Note: See TracChangeset for help on using the changeset viewer.