Changeset 3793:f2f6e3243599 in roaraudio for libroarrsound


Ignore:
Timestamp:
05/07/10 17:05:45 (14 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added some debug lions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroarrsound/libroarrsound.c

    r3744 r3793  
    5353 struct libroarrsound * self; 
    5454 
     55 ROAR_DBG("rsd_init(rd=%p) = ?", rd); 
     56 
    5557 if ( rd == NULL ) 
    5658  return -1; 
     
    161163 // FIXME: we currently ignore the port. :( 
    162164 
    163  if ( roar_simple_connect(&(self->con), host, "libroarrsound client") == -1 ) 
    164   return -1; 
     165 ROAR_DBG("libroarrsound_connect(self=%p): try to connect to: %s", self, host); 
     166 
     167 if ( roar_simple_connect(&(self->con), host, "libroarrsound client") == -1 ) { 
     168  ROAR_DBG("libroarrsound_connect(self=%p) = -1 // can not connect to server", self); 
     169  return -1; 
     170 } 
    165171 
    166172 self->flags |= LIBROARRSOUND_FLAGS_CONNECTED; 
    167173 
     174 ROAR_DBG("libroarrsound_connect(self=%p) = 0", self); 
    168175 return 0; 
    169176} 
     
    177184 int codec; 
    178185 
     186 ROAR_DBG("rsd_start(rd=%p) = ?", rd); 
     187 
    179188 if ( self == NULL ) 
    180189  return -1; 
     
    182191 if ( self->flags & LIBROARRSOUND_FLAGS_STREAMING ) 
    183192  return 0; 
     193 
     194 ROAR_DBG("rsd_start(rd=%p) = ?", rd); 
    184195 
    185196 if ( !(self->flags & LIBROARRSOUND_FLAGS_CONNECTED) ) { 
     
    188199 } 
    189200 
     201 ROAR_DBG("rsd_start(rd=%p) = ?", rd); 
     202 
    190203 switch (self->rsound.format) { 
    191204  case RSD_S16_LE: 
     
    214227 } 
    215228 
     229 ROAR_DBG("rsd_start(rd=%p) = ?", rd); 
     230 
    216231 if ( roar_vio_simple_new_stream_obj(&(self->vio), &(self->con), &(self->stream), 
    217232                                     self->rsound.rate, self->rsound.channels, bits, codec, ROAR_DIR_PLAY) == -1 ) 
    218233  return -1; 
    219234 
     235 ROAR_DBG("rsd_start(rd=%p) = ?", rd); 
     236 
    220237 self->flags |= LIBROARRSOUND_FLAGS_STREAMING; 
     238 
     239 ROAR_DBG("rsd_start(rd=%p) = 0", rd); 
    221240 
    222241 return 0; 
Note: See TracChangeset for help on using the changeset viewer.