fixed miscalculation in sampleBuffer::play
change xml save to utf8 encoding Modified Files: src/core/config_mgr.cpp src/lib/mmp.cpp src/lib/sample_buffer.cpp git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@138 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -706,7 +706,7 @@ bool FASTCALL sampleBuffer::play( sampleFrame * _ab,
|
||||
{
|
||||
frames_to_process = frames_for_loop;
|
||||
}
|
||||
const f_cnt_t f1 = static_cast<f_cnt_t>( play_frame * freq_factor );
|
||||
const f_cnt_t f1 = static_cast<f_cnt_t>( m_startFrame + ( play_frame - m_startFrame ) * freq_factor );
|
||||
/* Uint32 f2 = 0;
|
||||
while( f2 < f1 )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user