Changeset 4282:96355d721ce0 in roaraudio


Ignore:
Timestamp:
08/28/10 21:08:05 (14 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

more debug lions...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/ltm.c

    r4275 r4282  
    261261 } 
    262262 
     263 // TODO: do we need this block? 
    263264 for (i = 0; i < 8; i++) { 
    264265  d16[i] = ROAR_NET2HOST64(d16[i]); 
     
    321322 int i; 
    322323 
     324 ROAR_DBG("roar_ltm_get_streamptr(res=%p, streamidx=%i) = ?", res, streamidx); 
     325 
    323326 if ( res == NULL || streamidx < 0 || streamidx >= res->streams ) 
    324327  return NULL; 
    325328 
    326329 ptr = res->data; 
     330 
     331 ROAR_DBG("roar_ltm_get_streamptr(res=%p, streamidx=%i): res->data=%p", res, streamidx, res->data); 
    327332 
    328333 for (i = 0; i < streamidx; i++) { 
    329334  numchans = *ptr & 0xFFFF; 
     335 
     336  ROAR_DBG("roar_ltm_get_streamptr(res=%p, streamidx=%i): i=%i, numchans=%i", res, streamidx, i, numchans); 
     337 
    330338  ptr += res->nummt * numchans; 
    331339  ptr++; 
    332340 } 
    333341 
     342 ROAR_DBG("roar_ltm_get_streamptr(res=%p, streamidx=%i) = %p", res, streamidx, ptr); 
    334343 return ptr; 
    335344} 
     
    349358 int resmt; 
    350359 
     360 ROAR_DBG("roar_ltm_extract(res=%p, mt=0x%.4x, streamidx=%i, channel=%i) = ?", res, mt, streamidx, channel); 
     361 
    351362 if ( roar_ltm_numbits(mt) != 1 ) 
    352363  return -1; 
    353364 
     365 ROAR_DBG("roar_ltm_extract(res=%p, mt=0x%.4x, streamidx=%i, channel=%i) = ?", res, mt, streamidx, channel); 
     366 
    354367 if ( ptr == NULL ) 
    355368  return -1; 
    356369 
    357370 numchans = *ptr & 0xFFFF; 
     371 
     372 ROAR_DBG("roar_ltm_extract(res=%p, mt=0x%.4x, streamidx=%i, channel=%i): numchans=%i", res, mt, streamidx, channel, numchans); 
    358373 
    359374 if ( channel >= numchans ) 
     
    375390 } 
    376391 
     392 ROAR_DBG("roar_ltm_extract(res=%p, mt=?, streamidx=%i, channel=%i): ptr=%p", res, streamidx, channel, ptr); 
     393 ROAR_DBG("roar_ltm_extract(res=%p, mt=?, streamidx=%i, channel=%i) = %lli", res, streamidx, channel, (long long int)*ptr); 
     394 
    377395 return *ptr; 
    378396} 
Note: See TracChangeset for help on using the changeset viewer.