void PS3EyePair::start(int index) { if (index >= 0) { return camRefs[index]->start(); } for (int i = 0; i < camRefs.size(); ++i) { camRefs[i]->start(); } startUpdateThread(); }
bool SoundEngineOpenAL::init(std::string device) { // Create logger FileLogger *logger = new FileLogger; if (logger->init("RaumKlang.htm")) { setLogger(logger); } else { delete logger; setLogger(new ConsoleLogger()); } // Get default device if (device == "") { device = alcGetString(0, ALC_DEFAULT_DEVICE_SPECIFIER); } // Setup OpenAL context ALCdevice *dev = alcOpenDevice(device.c_str()); if (!dev) return false; ALCcontext *context = alcCreateContext(dev, 0); alcMakeContextCurrent(context); if (alcGetError(dev) != ALC_NO_ERROR) return false; // Startup message getLogger()->writeLine(ELL_Information, "RaumKlang 0.0.1 (OpenAL)"); getLogger()->writeLine(ELL_Information, std::string("Device: ") + device); // Create listener listener = new ListenerOpenAL(); // Add stream loaders initStreamLoaders(); // Start update thread running = true; threadstopped = false; startUpdateThread(); return true; }