From a2c5d69385fe0d8c5a666d570f5b464ca302d37d Mon Sep 17 00:00:00 2001 From: Yuri Victorovich Date: Sat, 17 Apr 2021 21:02:53 -0700 Subject: audio/audacity: Update 2.4.2 -> 3.0.0 I also changed the default of LADSPA to OFF and LV2 to ON because LV2 is a new generation of LADSPA. PR: 254598 Submitted by: xxjack12xx@gmail.com (maintainer) --- .../audacity/files/patch-src_ProjectSerializer.cpp | 60 ++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 audio/audacity/files/patch-src_ProjectSerializer.cpp (limited to 'audio/audacity/files/patch-src_ProjectSerializer.cpp') diff --git a/audio/audacity/files/patch-src_ProjectSerializer.cpp b/audio/audacity/files/patch-src_ProjectSerializer.cpp new file mode 100644 index 000000000000..3e43594c4a59 --- /dev/null +++ b/audio/audacity/files/patch-src_ProjectSerializer.cpp @@ -0,0 +1,60 @@ +--- src/ProjectSerializer.cpp.orig 2021-02-04 18:52:51 UTC ++++ src/ProjectSerializer.cpp +@@ -206,9 +206,9 @@ ProjectSerializer::ProjectSerializer(size_t allocSize) + std::call_once(flag, []{ + // Just once per run, store header information in the unique static + // dictionary that will be written into each project that is saved. +- // Store the size of "wxChar" so we can convert during recovery in +- // case the file is used on a system with a different character size. +- char size = sizeof(wxChar); ++ // Store the size of "wxStringCharType" so we can convert during recovery ++ // in case the file is used on a system with a different character size. ++ char size = sizeof(wxStringCharType); + mDict.AppendByte(FT_CharSize); + mDict.AppendData(&size, 1); + }); +@@ -242,7 +242,7 @@ void ProjectSerializer::WriteAttr(const wxString & nam + mBuffer.AppendByte(FT_String); + WriteName(name); + +- const Length len = value.length() * sizeof(wxChar); ++ const Length len = value.length() * sizeof(wxStringCharType); + WriteLength( mBuffer, len ); + mBuffer.AppendData(value.wx_str(), len); + } +@@ -309,7 +309,7 @@ void ProjectSerializer::WriteData(const wxString & val + { + mBuffer.AppendByte(FT_Data); + +- Length len = value.length() * sizeof(wxChar); ++ Length len = value.length() * sizeof(wxStringCharType); + WriteLength( mBuffer, len ); + mBuffer.AppendData(value.wx_str(), len); + } +@@ -317,7 +317,7 @@ void ProjectSerializer::WriteData(const wxString & val + void ProjectSerializer::Write(const wxString & value) + { + mBuffer.AppendByte(FT_Raw); +- Length len = value.length() * sizeof(wxChar); ++ Length len = value.length() * sizeof(wxStringCharType); + WriteLength( mBuffer, len ); + mBuffer.AppendData(value.wx_str(), len); + } +@@ -334,7 +334,7 @@ void ProjectSerializer::WriteSubTree(const ProjectSeri + + void ProjectSerializer::WriteName(const wxString & name) + { +- wxASSERT(name.length() * sizeof(wxChar) <= SHRT_MAX); ++ wxASSERT(name.length() * sizeof(wxStringCharType) <= SHRT_MAX); + UShort id; + + auto nameiter = mNames.find(name); +@@ -346,7 +346,7 @@ void ProjectSerializer::WriteName(const wxString & nam + { + // mNames is static. This appends each name to static mDict only once + // in each run. +- UShort len = name.length() * sizeof(wxChar); ++ UShort len = name.length() * sizeof(wxStringCharType); + + id = mNames.size(); + mNames[name] = id; -- cgit v1.2.3