Added some obvious errors explanations
This commit is contained in:
@ -242,10 +242,7 @@ Error AudioStreamPlaybackOGGVorbis::set_file(const String &p_file) {
|
||||
stream_valid = false;
|
||||
Error err;
|
||||
f = FileAccess::open(file, FileAccess::READ, &err);
|
||||
|
||||
if (err) {
|
||||
ERR_FAIL_COND_V(err, err);
|
||||
}
|
||||
ERR_FAIL_COND_V_MSG(err, err, "Cannot open file '" + p_file + "'.");
|
||||
|
||||
int errv = ov_open_callbacks(f, &vf, NULL, 0, _ov_callbacks);
|
||||
switch (errv) {
|
||||
@ -294,9 +291,7 @@ Error AudioStreamPlaybackOGGVorbis::_load_stream() {
|
||||
|
||||
Error err;
|
||||
f = FileAccess::open(file, FileAccess::READ, &err);
|
||||
if (err) {
|
||||
ERR_FAIL_COND_V(err, err);
|
||||
}
|
||||
ERR_FAIL_COND_V_MSG(err != OK, err, "Cannot open file '" + file + "'.");
|
||||
|
||||
int errv = ov_open_callbacks(f, &vf, NULL, 0, _ov_callbacks);
|
||||
switch (errv) {
|
||||
|
||||
Reference in New Issue
Block a user