mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-22 00:47:13 +01:00
From: martin@steghoefer.eu [PATCH 01/15] Fix runtime problem with wxWidgets 3.0: Correct string formatting: wxLongLong -> %lld + long long
The functions wxString::Format, wxString::Printf (and others indirectly) have become stricter about parameter types that don't match (format specifier vs. function parameters). So the bugs (that were already present in audacity before) become visible in wx3.0 as error message dialogs. I've checked all occurrences of Printf, wxPrintf, PrintfV, Format, FormatV, wxLogDebug and wxLogError systematically and made the type match. Note: In Shuttle.cpp this patch supersedes one related change done in r13466 because a wxLongLong_t can be bigger than an int and in a generic function like "TransferLongLong" this should be taken into account.
This commit is contained in:
@@ -1038,7 +1038,7 @@ bool WaveClip::Append(samplePtr buffer, sampleFormat format,
|
||||
sampleCount len, unsigned int stride /* = 1 */,
|
||||
XMLWriter* blockFileLog /*=NULL*/)
|
||||
{
|
||||
//wxLogDebug(wxT("Append: len=%i"), len);
|
||||
//wxLogDebug(wxT("Append: len=%lli"), (long long) len);
|
||||
|
||||
sampleCount maxBlockSize = mSequence->GetMaxBlockSize();
|
||||
sampleCount blockSize = mSequence->GetIdealAppendLen();
|
||||
@@ -1113,8 +1113,8 @@ bool WaveClip::AppendCoded(wxString fName, sampleCount start,
|
||||
bool WaveClip::Flush()
|
||||
{
|
||||
//wxLogDebug(wxT("WaveClip::Flush"));
|
||||
//wxLogDebug(wxT(" mAppendBufferLen=%i"), mAppendBufferLen);
|
||||
//wxLogDebug(wxT(" previous sample count %i"), mSequence->GetNumSamples());
|
||||
//wxLogDebug(wxT(" mAppendBufferLen=%lli"), (long long) mAppendBufferLen);
|
||||
//wxLogDebug(wxT(" previous sample count %lli"), (long long) mSequence->GetNumSamples());
|
||||
|
||||
bool success = true;
|
||||
if (mAppendBufferLen > 0) {
|
||||
@@ -1126,7 +1126,7 @@ bool WaveClip::Flush()
|
||||
}
|
||||
}
|
||||
|
||||
//wxLogDebug(wxT("now sample count %i"), mSequence->GetNumSamples());
|
||||
//wxLogDebug(wxT("now sample count %lli"), (long long) mSequence->GetNumSamples());
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user