| 670 | } |
| 671 | |
| 672 | void CDPCMChan::PlaySample(std::shared_ptr<const ft0cc::doc::dpcm_sample> pSamp, int Pitch) // // // |
| 673 | { |
| 674 | int SampleSize = pSamp->size(); |
| 675 | if (auto *p2A03 = dynamic_cast<C2A03 *>(m_pAPU->GetSoundChip(sound_chip_t::APU))) |
| 676 | p2A03->WriteSample(std::move(pSamp)); // // // |
| 677 | m_iPeriod = m_iCustomPitch != -1 ? m_iCustomPitch : Pitch; |
| 678 | m_iSampleLength = (SampleSize >> 4) - (m_iOffset << 2); |
| 679 | m_iLoopLength = SampleSize - m_iLoopOffset; |
| 680 | m_bEnabled = true; |
| 681 | m_bRetrigger = true; |
| 682 | m_iLoop = (Pitch & 0x80) >> 1; |
| 683 | m_iRetriggerCntr = m_iRetrigger; |
| 684 | } |
| 685 | |
| 686 | void CDPCMChan::ClearRegisters() |
| 687 | { |
no test coverage detected