| 131 | // |
| 132 | |
| 133 | void 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 | |
| 152 | void CSoundGen::AssignModule(CFamiTrackerModule &modfile) { |
| 153 | m_pModule = &modfile; |
no test coverage detected