void CheckError(const char *source, const char *fun, int line){ ALenum e; e = qalGetError(); if(e != AL_NO_ERROR) { if(s_alErrorFatal) SPRaise("[%s:%d] : %s : OpenAL error %d: %s", source, line, fun, (int)e, DescribeError(e)); else SPLog("[%s:%d] : %s : OpenAL error %d: %s", source, line, fun, (int)e, DescribeError(e)); } }
void CheckError(void){ ALenum e; e = qalGetError(); if(e != AL_NO_ERROR) { if(s_alErrorFatal) SPRaise("OpenAL error %d: %s", (int)e, DescribeError(e)); else SPLog("OpenAL error %d: %s", (int)e, DescribeError(e)); } }
void CheckError(void){ ALenum e; e = qalGetError(); if(e != AL_NO_ERROR) { SPRaise("OpenAL error %d: %s", (int)e, DescribeError(e)); } }
CameraList::CameraList() : list_(nullptr) { EdsError err = EdsGetCameraList(&list_); if (EDS_ERR_OK != err) { DEBUGSTREAM << DescribeError(err) << std::endl; throw Exception(err); } }
int CameraList::Count() const { EdsUInt32 count = -1; EdsError err = EdsGetChildCount(list_, &count); if (err != EDS_ERR_OK) { DEBUGSTREAM << DescribeError(err) << std::endl; throw Exception(err); } return count; }
Camera CameraList::get(const int index) { EdsCameraRef camera = nullptr; EdsError err = EdsGetChildAtIndex(list_, 0, &camera); if (EDS_ERR_OK != err) { DEBUGSTREAM << DescribeError(err) << std::endl; throw Exception(err); } Camera retval = Camera(camera); retval.Initialize(); return retval; }
Exception::Exception(const EdsError error) : std::runtime_error(DescribeError(error)) , error_(error) {}