Auxiliary::Auxiliary(QObject* pParent, const QString& group, int index, SoundManager* pSoundManager, EngineMaster* pEngine, EffectsManager* pEffectsManager) : BasePlayer(pParent, group) { ChannelHandleAndGroup channelGroup = pEngine->registerChannelGroup(group); EngineAux* pAuxiliary = new EngineAux(channelGroup, pEffectsManager); pEngine->addChannel(pAuxiliary); AudioInput auxInput = AudioInput(AudioPath::AUXILIARY, 0, 0, index); pSoundManager->registerInput(auxInput, pAuxiliary); }
Microphone::Microphone(QObject* pParent, const QString& group, int index, SoundManager* pSoundManager, EngineMaster* pEngine, EffectsManager* pEffectsManager) : BasePlayer(pParent, group) { ChannelHandleAndGroup channelGroup = pEngine->registerChannelGroup(group); EngineMicrophone* pMicrophone = new EngineMicrophone(channelGroup, pEffectsManager); pEngine->addChannel(pMicrophone); AudioInput micInput = AudioInput(AudioPath::MICROPHONE, 0, 0, index); pSoundManager->registerInput(micInput, pMicrophone); }
void EngineMaster::registerNonEngineChannelSoundIO(SoundManager* pSoundManager) { pSoundManager->registerInput(AudioInput(AudioPath::RECORD_BROADCAST, 0, 2), m_pEngineSideChain); pSoundManager->registerOutput(AudioOutput(AudioOutput::MASTER, 0, 2), this); pSoundManager->registerOutput(AudioOutput(AudioOutput::HEADPHONES, 0, 2), this); pSoundManager->registerOutput(AudioOutput(AudioOutput::BOOTH, 0, 2), this); for (int o = EngineChannel::LEFT; o <= EngineChannel::RIGHT; o++) { pSoundManager->registerOutput(AudioOutput(AudioOutput::BUS, 0, 2, o), this); } pSoundManager->registerOutput(AudioOutput(AudioOutput::RECORD_BROADCAST, 0, 2), this); }
/** * Constructs and returns an AudioInput given an XML element representing it. * @note This method is static. */ AudioInput AudioInput::fromXML(const QDomElement &xml) { AudioPathType type(AudioPath::getTypeFromString(xml.attribute("type"))); unsigned int index(xml.attribute("index", "0").toUInt()); unsigned int channel(xml.attribute("channel", "0").toUInt()); unsigned int channels(xml.attribute("channel_count", "0").toUInt()); // In Mixxx <1.12.0 we didn't save channels to file since they directly // corresponded to the type. To migrate users over, use mono for all // microphones and stereo for everything else since previously microphone // inputs were the only mono AudioPath. if (channels == 0) { channels = type == MICROPHONE ? 1 : 2; } return AudioInput(type, channel, channels, index); }