Changeset 431 for branches/libfreebob-1.0
- Timestamp:
- 03/11/07 05:39:11 (16 years ago)
- Files:
-
- branches/libfreebob-1.0/configure.ac (modified) (1 diff)
- branches/libfreebob-1.0/src/bebob/bebob_avplug_xml.cpp (modified) (1 diff)
- branches/libfreebob-1.0/src/bebob_light/bebob_light_avdevice.cpp (modified) (1 diff)
- branches/libfreebob-1.0/src/libfreebobstreaming/freebob_streaming.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/libfreebob-1.0/configure.ac
r427 r431 24 24 m4_define(freebob_major_version, 1) 25 25 m4_define(freebob_minor_version, 0) 26 m4_define(freebob_micro_version, 2)26 m4_define(freebob_micro_version, 3) 27 27 28 28 m4_define(freebob_version, freebob_major_version.freebob_minor_version.freebob_micro_version) branches/libfreebob-1.0/src/bebob/bebob_avplug_xml.cpp
r241 r431 162 162 free( result ); 163 163 164 asprintf( &result, "%d", channelInfo->m_location );164 asprintf( &result, "%d", channelInfo->m_location-1 ); 165 165 if ( !xmlNewChild( stream, 0, 166 166 BAD_CAST "Location", BAD_CAST result ) ) branches/libfreebob-1.0/src/bebob_light/bebob_light_avdevice.cpp
r241 r431 1375 1375 free( result ); 1376 1376 1377 asprintf( &result, "%d", channelInfo->m_location );1377 asprintf( &result, "%d", channelInfo->m_location-1 ); 1378 1378 if ( !xmlNewChild( stream, 0, 1379 1379 BAD_CAST "Location", BAD_CAST result ) ) branches/libfreebob-1.0/src/libfreebobstreaming/freebob_streaming.c
r427 r431 2001 2001 /* idea: 2002 2002 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, 2004 2004 we'll start at the right event for the midi port. 2005 2005 => if we increment j with 8, we stay at the right event. … … 2008 2008 written=0; 2009 2009 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) { 2011 2011 target_event=(quadlet_t *)(events + ((j * connection->spec.dimension) + stream->spec.position)); 2012 2012 quadlet_t sample_int=ntohl(*target_event); … … 2056 2056 assert (stream->spec.position < connection->spec.dimension); 2057 2057 assert(stream->user_buffer); 2058 2058 2059 2059 if (stream->spec.format == IEC61883_STREAM_TYPE_MIDI) { 2060 // first prefill the buffer with NO_DATA's on all time muxed channels2061 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 2068 2060 /* idea: 2069 2061 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, 2071 2063 we'll start at the right event for the midi port. 2072 2064 => if we increment j with 8, we stay at the right event. … … 2076 2068 read=freebob_ringbuffer_read(stream->buffer, (char *)(stream->user_buffer), 1*sizeof(quadlet_t))/sizeof(quadlet_t); 2077 2069 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; 2080 2071 target_event=(quadlet_t *)(events + ((j * connection->spec.dimension) + stream->spec.position)); 2081 2072 buffer=((quadlet_t *)(stream->user_buffer)); … … 2090 2081 } 2091 2082 return 0; 2092 2093 2083 } 2094 2084