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:
Danny McRae
2006-05-26 12:38:11 +00:00
parent 631d1126ec
commit 260e8cf59f
4 changed files with 16 additions and 5 deletions

View File

@@ -1,3 +1,12 @@
2006-5-26 Javier Serrano Polo <jasp00/dot/terra/dot/es>
* 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 <khjklujn/at/users/dot/sourceforge/dot/net>
* include/oscillator.h:
FM mixing sometimes calculates a negative "time" for the sampling

View File

@@ -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();
}

View File

@@ -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();

View File

@@ -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 )
{