Skip to content

Commit

Permalink
Correct LibsndfileReader::checkFile for better support on iOS.
Browse files Browse the repository at this point in the history
  • Loading branch information
sletz committed Mar 30, 2024
1 parent 551bd47 commit c756e42
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions architecture/faust/gui/LibsndfileReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,18 +165,17 @@ struct LibsndfileReader : public SoundfileReader {
return false;
}
#endif
*/

std::ofstream ofs;
ofs.open(path_name, std::ios_base::in);
if (!ofs.is_open()) {
*/

std::ifstream ifs(path_name);
if (!ifs.is_open()) {
return false;
} else {
SF_INFO snd_info;
snd_info.format = 0;
SNDFILE* snd_file = sf_open(path_name.c_str(), SFM_READ, &snd_info);
return checkFileAux(snd_file, path_name);
}

SF_INFO snd_info;
snd_info.format = 0;
SNDFILE* snd_file = sf_open(path_name.c_str(), SFM_READ, &snd_info);
return checkFileAux(snd_file, path_name);
}

bool checkFile(unsigned char* buffer, size_t length) override
Expand Down

0 comments on commit c756e42

Please sign in to comment.