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

Method AssignDocument

Source/SoundGen.cpp:133–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131//
132
133void CSoundGen::AssignDocument(CFamiTrackerDoc *pDoc)
134{
135 // Called from main thread
136 ASSERT(GetCurrentThreadId() == FTEnv.GetMainApp()->m_nThreadID);
137
138 // Ignore all but the first document (as new documents are used to import files)
139 if (m_pDocument)
140 return;
141
142 // Assigns a document to this object
143 m_pDocument = pDoc;
144 AssignModule(*m_pDocument->GetModule()); // // //
145
146 m_pSoundDriver->LoadAPU(*m_pAPU); // // //
147 m_pSoundDriver->SetTempoCounter(m_pTempoCounter); // // //
148
149 DocumentPropertiesChanged(pDoc); // // //
150}
151
152void CSoundGen::AssignModule(CFamiTrackerModule &modfile) {
153 m_pModule = &modfile;

Callers 2

CFamiTrackerDocMethod · 0.80
InitInstanceMethod · 0.80

Calls 4

GetMainAppMethod · 0.80
GetModuleMethod · 0.80
LoadAPUMethod · 0.80
SetTempoCounterMethod · 0.80

Tested by

no test coverage detected