MCPcopy Create free account
hub / github.com/HertzDevil/0CC-FamiTracker / LoadSample

Method LoadSample

Source/InstrumentEditorDPCM.cpp:279–294  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

277}
278
279bool CInstrumentEditorDPCM::LoadSample(const CStringW &FilePath, const CStringW &FileName)
280{
281 CFile SampleFile;
282
283 if (!SampleFile.Open(FilePath, CFile::modeRead)) {
284 AfxMessageBox(IDS_FILE_OPEN_ERROR);
285 return false;
286 }
287
288 if (!InsertSample(LoadSampleFromFile(SampleFile, conv::to_utf8(FileName)))) // // //
289 return false;
290
291 BuildSampleList();
292 SampleFile.Close();
293 return true;
294}
295
296bool CInstrumentEditorDPCM::InsertSample(std::shared_ptr<ft0cc::doc::dpcm_sample> pNewSample) // // //
297{

Callers

nothing calls this directly

Calls 4

LoadSampleFromFileFunction · 0.85
to_utf8Function · 0.85
OpenMethod · 0.45
CloseMethod · 0.45

Tested by

no test coverage detected