Update of /cvsroot/audacity/audacity-src/src/blockfile
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv32208/blockfile
Modified Files:
Tag: Audacity_UmixIt
LegacyBlockFile.cpp PCMAliasBlockFile.cpp SimpleBlockFile.cpp
Log Message:
Fix potential crash on Mac caused by non-thread-safe utf8-conversion system
call. Now filename conversion calls are computed once and cached for filenames
that might be accessed from the other thread.
Index: LegacyBlockFile.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/blockfile/LegacyBlockFile.cpp,v
retrieving revision 1.8.6.4
retrieving revision 1.8.6.5
diff -u -d -r1.8.6.4 -r1.8.6.5
--- LegacyBlockFile.cpp 20 Dec 2006 22:55:45 -0000 1.8.6.4
+++ LegacyBlockFile.cpp 26 Feb 2007 10:17:20 -0000 1.8.6.5
@@ -181,7 +181,7 @@
info.frames = mLen + (mSummaryInfo.totalSummaryBytes /
SAMPLE_SIZE(mFormat));
- SNDFILE *sf = sf_open(FILENAME(mFileName.GetFullPath()), SFM_READ, &info);
+ SNDFILE *sf = sf_open(mFullPath, SFM_READ, &info);
if (!sf)
return 0;
Index: SimpleBlockFile.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/blockfile/SimpleBlockFile.cpp,v
retrieving revision 1.8.2.2.2.4
retrieving revision 1.8.2.2.2.5
diff -u -d -r1.8.2.2.2.4 -r1.8.2.2.2.5
--- SimpleBlockFile.cpp 20 Dec 2006 22:55:45 -0000 1.8.2.2.2.4
+++ SimpleBlockFile.cpp 26 Feb 2007 10:17:20 -0000 1.8.2.2.2.5
@@ -47,12 +47,12 @@
sampleFormat format):
BlockFile(wxFileName(baseFileName.GetFullPath() + ".au"), sampleLen)
{
- wxASSERT( !wxFileExists(FILENAME(mFileName.GetFullPath())) );
+ wxASSERT(!wxFileExists(mFullPath));
// Open and write the file
wxFFile file;
- if( !file.Open((const wxChar *)FILENAME(mFileName.GetFullPath()), "wb") )
+ if( !file.Open(mFullPath, "wb") )
// Throw an exception?
return;
@@ -150,7 +150,7 @@
{
wxFFile file;
- if( !file.Open((const wxChar *)FILENAME(mFileName.GetFullPath()), "rb") )
+ if( !file.Open(mFullPath, "rb") )
return false;
// The offset is just past the au header
@@ -177,7 +177,7 @@
SF_INFO info;
memset(&info, 0, sizeof(info));
- SNDFILE *sf = sf_open(FILENAME(mFileName.GetFullPath()), SFM_READ, &info);
+ SNDFILE *sf = sf_open(mFullPath, SFM_READ, &info);
if (!sf)
return 0;
Index: PCMAliasBlockFile.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/blockfile/PCMAliasBlockFile.cpp,v
retrieving revision 1.4.2.1.4.5
retrieving revision 1.4.2.1.4.6
diff -u -d -r1.4.2.1.4.5 -r1.4.2.1.4.6
--- PCMAliasBlockFile.cpp 20 Dec 2006 22:55:45 -0000 1.4.2.1.4.5
+++ PCMAliasBlockFile.cpp 26 Feb 2007 10:17:20 -0000 1.4.2.1.4.6
@@ -52,7 +52,7 @@
memset(&info, 0, sizeof(info));
- SNDFILE *sf = sf_open(FILENAME(mAliasedFileName.GetFullPath()), SFM_READ,
&info);
+ SNDFILE *sf = sf_open(mAliasedFullPath, SFM_READ, &info);
if (!sf)
return 0;
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs