void RecordNode::addInputChannel(GenericProcessor* sourceNode, int chan) { if (chan != AccessClass::getProcessorGraph()->midiChannelIndex) { int channelIndex = getNextChannel(false); channelPointers.add(sourceNode->channels[chan]); setPlayConfigDetails(channelIndex+1,0,44100.0,128); // std::cout << channelIndex << std::endl; channelPointers[channelIndex]->recordIndex = channelIndex; EVERY_ENGINE->addChannel(channelIndex,channelPointers[channelIndex]); } else { for (int n = 0; n < sourceNode->eventChannels.size(); n++) { eventChannelPointers.add(sourceNode->eventChannels[n]); } } }
void gotoNextChannel(void) { EmberAfPluginScanDispatchScanData scanData; EmberStatus status; emAfPluginNetworkSteeringCurrentChannel = getNextChannel(); if (emAfPluginNetworkSteeringCurrentChannel == 0) { debugPrintln("No more channels"); tryNextMethod(); return; } clearPanIdCandidates(); scanData.scanType = EMBER_ACTIVE_SCAN; scanData.channelMask = BIT32(emAfPluginNetworkSteeringCurrentChannel); scanData.duration = EMBER_AF_PLUGIN_NETWORK_STEERING_SCAN_DURATION; scanData.handler = scanResultsHandler; status = emberAfPluginScanDispatchScheduleScan(&scanData); if (EMBER_SUCCESS != status) { emberAfCorePrintln("Error: %p start scan failed: 0x%X", PLUGIN_NAME, status); cleanupAndStop(status); } else { emberAfCorePrintln("Starting scan on channel %d", emAfPluginNetworkSteeringCurrentChannel); } }
void AudioNode::addInputChannel(GenericProcessor* sourceNode, int chan) { int channelIndex = getNextChannel(false); setPlayConfigDetails(channelIndex+1,0,44100.0,128); channelPointers.add(sourceNode->channels[chan]); }
bool IndexFile::check(int level) { printf("Checking FileAllocator...\n"); try { if (fa.dump(level)) printf("FileAllocator OK\n"); else { printf("FileAllocator ERROR\n"); return false; } NameIterator names; bool have_name; unsigned long channels = 0; unsigned long total_nodes=0, total_used_records=0, total_records=0; unsigned long nodes, records; stdString dir; for (have_name = getFirstChannel(names); have_name; have_name = getNextChannel(names)) { ++channels; AutoPtr<RTree> tree(getTree(names.getName(), dir)); if (!tree) { printf("%s not found\n", names.getName().c_str()); return false; } printf("."); fflush(stdout); if (!tree->selfTest(nodes, records)) { printf("RTree for channel '%s' is broken\n", names.getName().c_str()); return false; } total_nodes += nodes; total_used_records += records; total_records += nodes * tree->getM(); } printf("\nAll RTree self-tests check out fine\n"); printf("%ld channels\n", channels); printf("Total: %ld nodes, %ld records out of %ld are used (%.1lf %%)\n", total_nodes, total_used_records, total_records, total_used_records*100.0/total_records); } catch (GenericException &e) { printf("Exception:\n%s\n", e.what()); } return true; }
void RecordNode::addInputChannel(GenericProcessor* sourceNode, int chan) { if (chan != getProcessorGraph()->midiChannelIndex) { int channelIndex = getNextChannel(false); setPlayConfigDetails(channelIndex+1,0,44100.0,128); channelPointers.add(sourceNode->channels[chan]); // std::cout << channelIndex << std::endl; updateFileName(channelPointers[channelIndex]); //if (channelPointers[channelIndex]->isRecording) // std::cout << " This channel will be recorded." << std::endl; //else // std::cout << " This channel will NOT be recorded." << std::endl; //std::cout << "adding channel " << getNextChannel(false) << std::endl; //std::pair<int, Channel> newPair (getNextChannel(false), newChannel); //std::cout << "adding channel " << getNextChannel(false) << std::endl; //continuouschannelPointers.insert(newPair); } else { for (int n = 0; n < sourceNode->eventChannels.size(); n++) { eventChannelPointers.add(sourceNode->eventChannels[n]); } } }