Skip to content

Commit

Permalink
removed cpp exception check from setVolume
Browse files Browse the repository at this point in the history
  • Loading branch information
alnitak committed May 23, 2024
1 parent afc7c3f commit 6fcabca
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lib/src/soloud.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1229,12 +1229,7 @@ interface class SoLoud {
if (!isInitialized) {
throw const SoLoudNotInitializedException();
}
final ret = SoLoudController().soLoudFFI.setVolume(handle, volume);
final error = PlayerErrors.values[ret];
if (error != PlayerErrors.noError) {
_log.severe(() => 'setVolume(): $error');
throw SoLoudCppException.fromPlayerError(error);
}
SoLoudController().soLoudFFI.setVolume(handle, volume);
}

/// Check if the [handle] is still valid.
Expand Down

0 comments on commit 6fcabca

Please sign in to comment.