Exemple #1
0
	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));
		}
	}
Exemple #2
0
	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));
		}
	}
Exemple #3
0
	void CheckError(void){
		ALenum e;
		e = qalGetError();
		if(e != AL_NO_ERROR) {
			SPRaise("OpenAL error %d: %s", (int)e, DescribeError(e));
		}
	}
Exemple #4
0
CameraList::CameraList()
    : list_(nullptr)
{  
  EdsError err = EdsGetCameraList(&list_);
  if (EDS_ERR_OK != err) {
    DEBUGSTREAM << DescribeError(err) << std::endl;
    throw Exception(err);
  }
}
Exemple #5
0
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;
}
Exemple #6
0
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)
{}