| 88 | } |
| 89 | |
| 90 | std::unique_ptr<CChannelMap> CSoundChipService::MakeChannelMap(CSoundChipSet chips, unsigned n163chs) const { |
| 91 | Assert(n163chs <= MAX_CHANNELS_N163 && (chips.ContainsChip(sound_chip_t::N163) == (n163chs != 0))); |
| 92 | |
| 93 | auto map = std::make_unique<CChannelMap>(chips, n163chs); // // // |
| 94 | |
| 95 | ForeachTrack([&] (stChannelID id) { |
| 96 | if (map->SupportsChannel(id)) |
| 97 | map->GetChannelOrder().AddChannel(id); |
| 98 | }); |
| 99 | |
| 100 | return map; |
| 101 | } |
| 102 | |
| 103 | std::unique_ptr<CSoundChip> CSoundChipService::MakeSoundChipDriver(sound_chip_t chip, CMixer &mixer, std::uint8_t nInstance) const { |
| 104 | return GetType(chip).MakeSoundDriver(mixer, nInstance); |