MCPcopy Create free account
hub / github.com/csound/csound / loadOrcLibrary

Method loadOrcLibrary

interfaces/CsoundFile.cpp:1233–1263  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1231}
1232
1233bool CsoundFile::loadOrcLibrary(const char *filename)
1234{
1235 if(!filename)
1236 {
1237 return false;
1238 }
1239 std::fstream stream;
1240 if(strlen(filename) > 0)
1241 {
1242 stream.open(filename, std::fstream::in | std::ios::binary);
1243 }
1244 else
1245 {
1246 const char *filename_ = getenv("CSOUND_HOME");
1247 if (filename_ != 0) {
1248 std::string orcLibraryFilename = filename_;
1249 orcLibraryFilename.append("/");
1250 orcLibraryFilename.append("library.orc");
1251 stream.open(orcLibraryFilename.c_str(), std::fstream::in | std::ios::binary);
1252 } else {
1253 return false;
1254 }
1255 }
1256 if(stream.good())
1257 {
1258 removeOrchestra();
1259 importOrchestra(stream);
1260 return true;
1261 }
1262 return false;
1263}
1264
1265std::string CsoundFile::generateFilename()
1266{

Callers

nothing calls this directly

Calls 1

openMethod · 0.80

Tested by

no test coverage detected