Changeset 4368:99783fa4f8d2 in roaraudio


Ignore:
Timestamp:
09/14/10 19:30:42 (14 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added function to create new sub-streams of a mixer

Location:
roard
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • roard/hwmixer.c

    r4367 r4368  
    166166} 
    167167 
     168struct hwmixer_stream * hwmixer_substream_new(struct hwmixer_stream * parent) { 
     169 struct roar_stream_server * ss; 
     170 struct hwmixer_stream * stream; 
     171 int id; 
     172 
     173 if ( parent == NULL ) 
     174  return NULL; 
     175 
     176 stream = roar_mm_malloc(sizeof(struct hwmixer_stream)); 
     177 if ( stream == NULL ) 
     178  return NULL; 
     179 
     180 if ( (id = streams_new_virtual(parent->basestream, &ss)) == -1 ) { 
     181  roar_mm_free(stream); 
     182  return NULL; 
     183 } 
     184 
     185 memset(stream, 0, sizeof(struct hwmixer_stream)); 
     186 
     187 stream->hwmixer    = parent->hwmixer; 
     188 stream->basestream = parent->basestream; 
     189 stream->stream     = id; 
     190 stream->baseud     = parent->baseud; 
     191 stream->ud         = NULL; 
     192 
     193 hwmixer_setup_info(stream); 
     194 
     195 streams_set_mixerstream(id, stream); 
     196 
     197 return stream; 
     198} 
     199 
    168200//ll 
  • roard/include/hwmixer.h

    r4365 r4368  
    4747int hwmixer_set_volume(int id, struct roar_stream_server * ss, struct hwmixer_stream * mstream, struct roar_mixer_settings * settings); 
    4848 
     49struct hwmixer_stream * hwmixer_substream_new(struct hwmixer_stream * parent); 
     50 
    4951// Mixers: 
    5052 
Note: See TracChangeset for help on using the changeset viewer.