HIDDevice::~HIDDevice() { if (isRunning() == true) { m_running = false; wait(); } closeInput(); }
Loopback::~Loopback() { for (int i = 0; i < QLCIOPLUGINS_UNIVERSES; i++) { closeOutput(i); closeInput(i); delete [] m_values[i]; } }
/** @brief Unsubscribe from capturing from an opened input device. If the input device has no more subscriptions, it will be closed. */ void Audio::unsubscribeInput() { qDebug() << "unsubscribing input" << inputSubscriptions; if (inputSubscriptions > 0) inputSubscriptions--; else if(inputSubscriptions < 0) inputSubscriptions = 0; if (!inputSubscriptions) { closeOutput(); closeInput(); } }
int main(int argc, char *argv[]) { char *fileName; printf("MILA interpreter\n"); if (argc == 1) { printf("Input from keyboard, write the source code terminated by a dot.\n"); fileName = NULL; } else { fileName = argv[1]; printf("Input file %s.\n", fileName); } if(!initParser(fileName)) { printf("Error creating the syntax analyzer.\n"); return 0; } Program(); closeInput(); Print(); Run(); freeSymbTab(); printf("End.\n"); return 0; }
void HIDLinuxJoystick::init() { if (openDevice() == false) return; /* Number of axes */ if (ioctl(m_file.handle(), JSIOCGAXES, &m_axesNumber) < 0) { m_axesNumber = 0; qWarning() << "Unable to get number of axes:" << strerror(errno); } /* Number of buttons */ if (ioctl(m_file.handle(), JSIOCGBUTTONS, &m_buttonsNumber) < 0) { m_buttonsNumber = 0; qWarning() << "Unable to get number of buttons:" << strerror(errno); } closeInput(); }
JNIEXPORT void JNICALL Java_org_secmem232_phonetop_android_natives_InputHandler_closeInputDevice(JNIEnv* env, jobject thiz){ closeInput(); }
HIDDMXDevice::~HIDDMXDevice() { closeInput(); closeOutput(); hid_close(m_handle); }