Changeset 5235:f6772d7182e8 in roaraudio


Ignore:
Timestamp:
11/12/11 16:33:39 (12 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

use newer API functions

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • libroarsndio/volume.c

    r4708 r5235  
    6464 mixer.rpg_mul = 1; 
    6565 mixer.rpg_div = 1; 
     66 mixer.mixer[0] = vol; 
     67 
     68 if ( roar_set_vol2(&(hdl->con), roar_stream_get_id(&(hdl->stream)), &mixer, 0, ROAR_SET_VOL_UNMAPPED) == -1 ) 
     69  return 0; 
    6670 
    6771 for (i = 0; i < hdl->info.channels; i++) 
    6872  mixer.mixer[i] = vol; 
    6973 
    70  if ( roar_set_vol(&(hdl->con), roar_stream_get_id(&(hdl->stream)), &mixer, hdl->info.channels) == -1 ) 
     74 if ( roar_set_vol2(&(hdl->con), roar_stream_get_id(&(hdl->stream)), &mixer, hdl->info.channels, ROAR_SET_VOL_ALL) == -1 ) 
    7175  return 0; 
    7276 
  • plugins/gstreamer0.10/roarmixer.c

    r4708 r5235  
    285285 int channels; 
    286286 struct roar_mixer_settings m; 
     287 int mode = ROAR_SET_VOL_ALL; 
    287288 gint i; 
    288289 
     
    296297 
    297298 if ( channels != track->num_channels ) { 
    298   ROAR_WARN("gst_roarmixer_get_volume(*): numer of channels for stream %i mismatch", roartrack->stream_id); 
     299  ROAR_WARN("gst_roarmixer_get_volume(*): numer of channels for stream %i mismatch (local: %i, server: %i)", 
     300            roartrack->stream_id, (int)track->num_channels, channels); 
    299301 
    300302  if ( track->num_channels < channels ) 
    301303   channels = track->num_channels; 
     304  mode = ROAR_SET_VOL_UNMAPPED; 
    302305 } 
    303306 
     
    308311 m.scale = 65535; 
    309312 
    310  roar_set_vol(&(mixer->con), roartrack->stream_id, &m, channels); 
     313 _LIBROAR_IGNORE_RET(roar_set_vol2(&(mixer->con), roartrack->stream_id, &m, channels, mode)); 
    311314} 
    312315 
     
    360363 
    361364  if (mute) { 
    362     roar_stream_set_flags(&(mixer->con), &s, ROAR_FLAG_MUTE, ROAR_SET_FLAG); 
     365    _LIBROAR_IGNORE_RET(roar_stream_set_flags2(&(mixer->con), &s, ROAR_FLAG_MUTE, ROAR_SET_FLAG)); 
    363366  } else { 
    364     roar_stream_set_flags(&(mixer->con), &s, ROAR_FLAG_MUTE, ROAR_RESET_FLAG); 
     367    _LIBROAR_IGNORE_RET(roar_stream_set_flags2(&(mixer->con), &s, ROAR_FLAG_MUTE, ROAR_RESET_FLAG)); 
    365368  } 
    366369} 
  • plugins/gstreamer0.10/roarsink.c

    r4708 r5235  
    251251    goto couldnt_connect; 
    252252 
    253   if ( roar_server_oinfo(roar_vs_connection_obj(roarsink->vss, NULL), &oinfo) == -1 ) 
     253  if ( roar_server_oinfo2(roar_vs_connection_obj(roarsink->vss, NULL), &oinfo, ROAR_DIR_PLAY) == -1 ) 
    254254    goto no_server_info; 
    255255 
  • plugins/xmms/roar.c

    r4708 r5235  
    170170 g_inst.pause   = 0; 
    171171 
    172  roar_stream_set_role(&(g_inst.con), &(g_inst.stream), ROAR_ROLE_MUSIC); 
     172 _LIBROAR_IGNORE_RET(roar_stream_set_role(&(g_inst.con), &(g_inst.stream), ROAR_ROLE_MUSIC)); 
    173173 roar_update_metadata(); 
    174174 roar_set_volume(g_inst.mixer.l, g_inst.mixer.r); 
     
    371371 mixer.scale    = 100; 
    372372 
    373  roar_set_vol(&(g_inst.con), g_inst.stream.id, &mixer, 2); 
     373 _LIBROAR_IGNORE_RET(roar_set_vol2(&(g_inst.con), g_inst.stream.id, &mixer, 2, ROAR_SET_VOL_UNMAPPED)); 
    374374} 
    375375 
Note: See TracChangeset for help on using the changeset viewer.