checkChannel method

bool checkChannel(
  1. int result,
  2. String operation
)

Like check, but treats an invalid or stolen channel handle as a clean "finished" signal (returns false) instead of an error.

Implementation

bool checkChannel(int result, String operation) {
  if (result == fmodOk) return true;
  if (result == fmodErrInvalidHandle || result == fmodErrChannelStolen) {
    return false;
  }
  throw FmodException(operation, result);
}