cocos2d/external/android-specific/tremolo/Tremolo/framing.c
static ogg_reference *ogg_buffer_sub(ogg_reference *or,long length){
  ogg_reference *ret=0,*head=0;

  /* duplicate the reference chain; increment refcounts */
  while(or && length){
    ogg_reference *temp=_fetch_ref(or->buffer->ptr.owner);
    if(head)
      head->next=temp;
    else
      ret=temp;
    head=temp;
    head->buffer=or->buffer;
    head->begin=or->begin;
    head->length=length;
    if(head->length>or->length)
      head->length=or->length;

    length-=head->length;
    or=or->next;
  }

  ogg_buffer_mark(ret);
  return ret;
}
/* duplicate a reference (pointing to the same actual buffer memory)
   and increment buffer refcount.  If the desired segment is zero
   length, a zero length ref is returned. */
duplicate a reference (pointing to the same actual buffer memory)
and increment buffer refcount.  If the desired segment is zero
length, a zero length ref is returned.
duplicate a reference ( pointing to the same actual buffer memory ) and increment buffer refcount . If the desired segment is zero length a zero length ref is returned .
static ogg_reference *ogg_buffer_sub(ogg_reference *or,long length){
  ogg_reference *ret=0,*head=0;
  while(or && length){
    ogg_reference *temp=_fetch_ref(or->buffer->ptr.owner);
    if(head)
      head->next=temp;
    else
      ret=temp;
    head=temp;
    head->buffer=or->buffer;
    head->begin=or->begin;
    head->length=length;
    if(head->length>or->length)
      head->length=or->length;
    length-=head->length;
    or=or->next;
  }
  ogg_buffer_mark(ret);
  return ret;
}
static ogg_reference * ogg_buffer_sub ( ogg_reference * or , long length ) { ogg_reference * ret = 0 , * head = 0 ; while ( or && length ) { ogg_reference * temp = _fetch_ref ( or -> buffer -> ptr . owner ) ; if ( head ) head -> next = temp ; else ret = temp ; head = temp ; head -> buffer = or -> buffer ; head -> begin = or -> begin ; head -> length = length ; if ( head -> length > or -> length ) head -> length = or -> length ; length -= head -> length ; or = or -> next ; } ogg_buffer_mark ( ret ) ; return ret ; }
duplicate a reference (pointing to the same actual buffer memory)
and increment buffer refcount.
duplicate a reference ( pointing to the same actual buffer memory ) and increment buffer refcount .
/* duplicate the reference chain; increment refcounts */