All pastes #4080 Raw Edit

enginexinexinescope.c

public cpp v1 · immutable
#4080 ·published 2005-01-12 01:14 UTC
rendered paste body
static voidscope_port_put_buffer( xine_audio_port_t *port_gen, audio_buffer_t *buf, xine_stream_t *stream ){    const int num_samples = buf->num_frames * this->channels;    metronom_t *myMetronom = &this->metronom;    MyNode *new_node;    if( port->bits == 8 ) {       printf( "You dare tempt me with 8 bits?!\n" ); return; }    if( buf->stream == 0 ) {       port->original_port->put_buffer( port->original_port, buf, stream );<<<<<<< xine-scope.c/*       printf( "stream == 0! what does that mean?!\n" ); */ return; }=======       /*printf( "stream == 0! what does that mean?!\n" );*/ return; }>>>>>>> 1.23    /* I keep my own metronom because xine wouldn't for some reason */    memcpy( &this->metronom, stream->metronom, sizeof(metronom_t) );    new_node             = malloc( sizeof(MyNode) );    new_node->vpts       = myMetronom->got_audio_samples( myMetronom, buf->vpts, buf->num_frames );    new_node->num_frames = buf->num_frames;    new_node->mem        = malloc( num_samples * 2 );    memcpy( new_node->mem, buf->mem, num_samples * 2 );    {        int64_t        K  = myMetronom->pts_per_smpls; /*smpls = 1<<16 samples*/        K *= num_samples;        K /= (1<<16);        K += new_node->vpts;        new_node->vpts_end = K;    }    port->original_port->put_buffer( port->original_port, buf, stream );    /* finally we should append the current buffer to the list     * this is thread-safe due to the way we handle the list in the GUI thread */    new_node->next   = this->list->next;    this->list->next = new_node;    #undef port    #undef this}