Show
Ignore:
Timestamp:
03/11/07 05:39:11 (16 years ago)
Author:
pieterpalmers
Message:

- fix bug in midi handling
- bump version to 1.0.2

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/libfreebob-1.0/configure.ac

    r427 r431  
    2424m4_define(freebob_major_version, 1) 
    2525m4_define(freebob_minor_version, 0) 
    26 m4_define(freebob_micro_version, 2
     26m4_define(freebob_micro_version, 3
    2727 
    2828m4_define(freebob_version, freebob_major_version.freebob_minor_version.freebob_micro_version) 
  • branches/libfreebob-1.0/src/bebob/bebob_avplug_xml.cpp

    r241 r431  
    162162            free( result ); 
    163163 
    164             asprintf( &result, "%d", channelInfo->m_location ); 
     164            asprintf( &result, "%d", channelInfo->m_location-1 ); 
    165165            if ( !xmlNewChild( stream,  0, 
    166166                               BAD_CAST "Location",  BAD_CAST result ) ) 
  • branches/libfreebob-1.0/src/bebob_light/bebob_light_avdevice.cpp

    r241 r431  
    13751375            free( result ); 
    13761376 
    1377             asprintf( &result, "%d", channelInfo->m_location ); 
     1377            asprintf( &result, "%d", channelInfo->m_location-1 ); 
    13781378            if ( !xmlNewChild( stream,  0, 
    13791379                               BAD_CAST "Location",  BAD_CAST result ) ) 
  • branches/libfreebob-1.0/src/libfreebobstreaming/freebob_streaming.c

    r427 r431  
    20012001                        /* idea: 
    20022002                        spec says: current_midi_port=(dbc+j)%8; 
    2003                         => if we start at (dbc+stream->location-1)%8 [due to location_min=1],  
     2003                        => if we start at (dbc+stream->location)%8,  
    20042004                        we'll start at the right event for the midi port. 
    20052005                        => if we increment j with 8, we stay at the right event. 
     
    20082008                        written=0; 
    20092009                         
    2010                         for(j = (dbc & 0x07)+stream->spec.location-1; j < nsamples; j += 8) { 
     2010                        for(j = (dbc & 0x07)+stream->spec.location; j < nsamples; j += 8) { 
    20112011                                target_event=(quadlet_t *)(events + ((j * connection->spec.dimension) + stream->spec.position)); 
    20122012                                quadlet_t sample_int=ntohl(*target_event); 
     
    20562056                assert (stream->spec.position < connection->spec.dimension); 
    20572057                assert(stream->user_buffer); 
    2058  
     2058                 
    20592059                if (stream->spec.format == IEC61883_STREAM_TYPE_MIDI) { 
    2060                         // first prefill the buffer with NO_DATA's on all time muxed channels 
    2061                         for(j=0; (j < nsamples); j++) { 
    2062                                 target_event=(quadlet_t *)(events + ((j * connection->spec.dimension) + stream->spec.position)); 
    2063                                  
    2064                                 *target_event=htonl(IEC61883_AM824_SET_LABEL(0,IEC61883_AM824_LABEL_MIDI_NO_DATA)); 
    2065  
    2066                         } 
    2067                          
    20682060                        /* idea: 
    20692061                                spec says: current_midi_port=(dbc+j)%8; 
    2070                                 => if we start at (dbc+stream->location-1)%8 [due to location_min=1],  
     2062                                => if we start at (dbc+stream->location)%8,  
    20712063                                we'll start at the right event for the midi port. 
    20722064                                => if we increment j with 8, we stay at the right event. 
     
    20762068                                read=freebob_ringbuffer_read(stream->buffer, (char *)(stream->user_buffer), 1*sizeof(quadlet_t))/sizeof(quadlet_t); 
    20772069                                if(read) { 
    2078 //                                      j = (dbc%8)+stream->spec.location-1;  
    2079                                         j = (dbc & 0x07)+stream->spec.location-1;  
     2070                                        j = (dbc & 0x07)+stream->spec.location;  
    20802071                                        target_event=(quadlet_t *)(events + ((j * connection->spec.dimension) + stream->spec.position)); 
    20812072                                        buffer=((quadlet_t *)(stream->user_buffer)); 
     
    20902081        } 
    20912082        return 0; 
    2092  
    20932083} 
    20942084