1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-04-29 23:29:41 +02:00

In ODPCMAliasBlockFile check file existance before opening; solves bug 26 on Mac

This commit is contained in:
BusinessmanProgrammerSteve 2010-02-09 23:30:27 +00:00
parent 81c204a5f5
commit a6001192f2

View File

@ -620,7 +620,7 @@ int ODPCMAliasBlockFile::ReadData(samplePtr data, sampleFormat format,
wxFile f; // will be closed when it goes out of scope
SNDFILE *sf = NULL;
if (f.Open(aliasPath)) {
if (f.Exists(aliasPath) && f.Open(aliasPath)) {
// Even though there is an sf_open() that takes a filename, use the one that
// takes a file descriptor since wxWidgets can open a file with a Unicode name and
// libsndfile can't (under Windows).