diff --git a/ChangeLog b/ChangeLog index 44d458b01..775fc49ca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2006-5-26 Javier Serrano Polo + * src/lib/sample_buffer.cpp: + corrected the calculation of f1 in play to prevent it from shifting + the start_frame out of bounds when resampling. + + * src/core/config_mgr.cpp: + * src/lib/mmp.cpp: + changed the xml output to use UTF8 encoding instead of ascii. + 2006-5-23 Danny McRae * include/oscillator.h: FM mixing sometimes calculates a negative "time" for the sampling diff --git a/src/core/config_mgr.cpp b/src/core/config_mgr.cpp index 85c81ca63..1f1b1783e 100644 --- a/src/core/config_mgr.cpp +++ b/src/core/config_mgr.cpp @@ -937,9 +937,10 @@ void configManager::saveConfigFile( void ) } #ifdef QT4 - outfile.write( xml.toAscii().constData(), xml.length() ); + outfile.write( xml.toUtf8().constData(), xml.length() ); #else - outfile.writeBlock( xml.ascii(), xml.length() ); + QCString xml_utf8 = xml.utf8(); + outfile.writeBlock( xml_utf8.data(), xml_utf8.length() ); #endif outfile.close(); } diff --git a/src/lib/mmp.cpp b/src/lib/mmp.cpp index 1128f2068..7ef1096f7 100644 --- a/src/lib/mmp.cpp +++ b/src/lib/mmp.cpp @@ -267,9 +267,10 @@ bool multimediaProject::writeFile( const QString & _fn, bool _overwrite_check ) #endif ); #ifdef QT4 - outfile.write( xml.toAscii().constData(), xml.length() ); + outfile.write( xml.toUtf8().constData(), xml.length() ); #else - outfile.writeBlock( xml.ascii(), xml.length() ); + QCString xml_utf8 = xml.utf8(); + outfile.writeBlock( xml_utf8.data(), xml_utf8.length() ); #endif outfile.close(); diff --git a/src/lib/sample_buffer.cpp b/src/lib/sample_buffer.cpp index c2b7f440e..7eeb258f8 100644 --- a/src/lib/sample_buffer.cpp +++ b/src/lib/sample_buffer.cpp @@ -706,7 +706,7 @@ bool FASTCALL sampleBuffer::play( sampleFrame * _ab, { frames_to_process = frames_for_loop; } - const f_cnt_t f1 = static_cast( play_frame * freq_factor ); + const f_cnt_t f1 = static_cast( m_startFrame + ( play_frame - m_startFrame ) * freq_factor ); /* Uint32 f2 = 0; while( f2 < f1 ) {