public void mute(UInt32 sidNum, UInt32 voice, bool enable) { sidemu s = m_mixer.getSid(sidNum); if (s != null) { s.voice(voice, enable); } }
private void sidParams(double cpuFreq, int frequency, sidplayfp.SidConfig.sampling_method_t sampling, bool fastSampling) { for (UInt32 i = 0; ; i++) { sidemu s = m_mixer.getSid(i); if (s == null) { break; } s.sampling((float)cpuFreq, frequency, sampling, fastSampling); } }
public void addSid(sidemu chip) { if (chip != null) { m_chips.Add(chip); m_buffers.Add(chip.buffer()); m_iSamples = new List <int>(m_buffers.Count); m_iSamples.Add(0); if (m_mix.Length > 0) { updateParams(); } } }
private void sidCreate(sidplayfp.sidbuilder builder, sidplayfp.SidConfig.sid_model_t defaultModel, bool forced, ref List <UInt32> extraSidAddresses) { if (builder != null) { sidplayfp.SidTuneInfo tuneInfo = m_tune.getInfo(); // Setup base SID sidplayfp.SidConfig.sid_model_t userModel = getSidModel(tuneInfo.sidModel(0), defaultModel, forced); sidemu s = builder.lock_(m_c64.getEventScheduler(), userModel); if (!builder.getStatus()) { throw new configError(builder.error()); } m_c64.setBaseSid(s); m_mixer.addSid(s); // Setup extra SIDs if needed if (extraSidAddresses.Count != 0) { // If bits 6-7 are set to Unknown then the second SID will be set to the same SID // model as the first SID. defaultModel = userModel; UInt32 extraSidChips = (UInt32)extraSidAddresses.Count; for (UInt32 i = 0; i < extraSidChips; i++) { sidplayfp.SidConfig.sid_model_t userModel_1 = getSidModel(tuneInfo.sidModel(i + 1), defaultModel, forced); sidemu s1 = builder.lock_(m_c64.getEventScheduler(), userModel_1); if (!builder.getStatus()) { throw new configError(builder.error()); } if (!m_c64.addExtraSid(s1, (Int32)extraSidAddresses[(Int32)i])) { throw new configError(ERR_UNSUPPORTED_SID_ADDR); } m_mixer.addSid(s1); } } } }
private void sidRelease() { m_c64.clearSids(); for (UInt32 i = 0; ; i++) { sidemu s = m_mixer.getSid(i); if (s == null) { break; } sidplayfp.sidbuilder b = s.builder(); if (b != null) { b.unlock(s); } } m_mixer.clearSids(); }
/* * This file is part of libsidplayfp, a SID player engine. * * Copyright 2011-2016 Leandro Nini <*****@*****.**> * Copyright 2007-2010 Antti Lankila * Copyright 2000 Simon White * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //#include "mixer.h" //#include <cassert> //#include <algorithm> //#include "sidemu.h" public void clockChip(sidemu s) { s.clock(); }