Exemplo n.º 1
0
HIDDevice::~HIDDevice()
{
    if (isRunning() == true)
    {
        m_running = false;
        wait();
    }
    closeInput();
}
Exemplo n.º 2
0
Loopback::~Loopback()
{
    for (int i = 0; i < QLCIOPLUGINS_UNIVERSES; i++)
    {
        closeOutput(i);
        closeInput(i);
        delete [] m_values[i];
    }
}
Exemplo n.º 3
0
Arquivo: audio.cpp Projeto: czaks/qTox
/**
@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();
    }
}
Exemplo n.º 4
0
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;
}
Exemplo n.º 5
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();
}
Exemplo n.º 6
0
JNIEXPORT void JNICALL Java_org_secmem232_phonetop_android_natives_InputHandler_closeInputDevice(JNIEnv* env, jobject thiz){
	closeInput();
}
Exemplo n.º 7
0
HIDDMXDevice::~HIDDMXDevice()
{
    closeInput();
    closeOutput();
    hid_close(m_handle);
}