Changeset 3793:f2f6e3243599 in roaraudio
- Timestamp:
- 05/07/10 17:05:45 (14 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroarrsound/libroarrsound.c
r3744 r3793 53 53 struct libroarrsound * self; 54 54 55 ROAR_DBG("rsd_init(rd=%p) = ?", rd); 56 55 57 if ( rd == NULL ) 56 58 return -1; … … 161 163 // FIXME: we currently ignore the port. :( 162 164 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 } 165 171 166 172 self->flags |= LIBROARRSOUND_FLAGS_CONNECTED; 167 173 174 ROAR_DBG("libroarrsound_connect(self=%p) = 0", self); 168 175 return 0; 169 176 } … … 177 184 int codec; 178 185 186 ROAR_DBG("rsd_start(rd=%p) = ?", rd); 187 179 188 if ( self == NULL ) 180 189 return -1; … … 182 191 if ( self->flags & LIBROARRSOUND_FLAGS_STREAMING ) 183 192 return 0; 193 194 ROAR_DBG("rsd_start(rd=%p) = ?", rd); 184 195 185 196 if ( !(self->flags & LIBROARRSOUND_FLAGS_CONNECTED) ) { … … 188 199 } 189 200 201 ROAR_DBG("rsd_start(rd=%p) = ?", rd); 202 190 203 switch (self->rsound.format) { 191 204 case RSD_S16_LE: … … 214 227 } 215 228 229 ROAR_DBG("rsd_start(rd=%p) = ?", rd); 230 216 231 if ( roar_vio_simple_new_stream_obj(&(self->vio), &(self->con), &(self->stream), 217 232 self->rsound.rate, self->rsound.channels, bits, codec, ROAR_DIR_PLAY) == -1 ) 218 233 return -1; 219 234 235 ROAR_DBG("rsd_start(rd=%p) = ?", rd); 236 220 237 self->flags |= LIBROARRSOUND_FLAGS_STREAMING; 238 239 ROAR_DBG("rsd_start(rd=%p) = 0", rd); 221 240 222 241 return 0;
Note: See TracChangeset
for help on using the changeset viewer.