[ACCEPTED]-AVAudioPlayer initialization: error code -50-core-audio
“ OSStatus error -50” means paramErr
, an old-style 1 Mac error code indicating a bad parameter.
Regarding the comment from Brynjar:
The 7 Apple NSURL
Class Reference describing URLWithString
states 6
To create NSURL objects for file system 5 paths, use fileURLWithPath:isDirectory: instead.
I 4 have found that using URLWithString
for file system paths 3 generates the error reported by pix0r and 2 therefore could be another explanation for 1 error code = -50
Make sure your NSURL
is valid, or you will get 1 error code -50 "Operation could not be completed".
I'm adding my version of the issue and solution 17 because I encountered the error with a print 16 statement. I think it was related to string 15 interpolation and or trying to forcibly 14 print nsattributedstrings. I attempted to 13 do the following.
print("THE ARRAY COUNT IS : \(unwrappedResults.count)\n\n\n
THE FULL ARRAY IS THE FIRST WHOLE RESULT IS: \(unwrappedResults)\n\n\n \ (unwrappedResults[0])\n
THE ATTRIBUTED FULL TEXT IS: \(unwrappedResults[0].attributedFullText)\n\n\n
THE ATTRIBUTED PRIMARY TEXT IS: \(unwrappedResults[0].attributedPrimaryText)\n\n\n
THE ATTRIBUTED SECONDARY TEXT IS: \(unwrappedResults[0].attributedSecondaryText)\n\n\n")
something about this was 12 incorrect and no print would occur. I would 11 receive the error following errors in my 10 console.
boringssl_metrics_log_metric_block_invoke(131) Failed 9 to log metrics & boringssl_metrics_log_metric_block_invoke(133) Error 8 Domain=NSOSStatusErrorDomain Code=-50 "Unsupported 7 xpc type" UserInfo={NSDescription=Unsupported 6 xpc type}
I fixed this issue by changing 5 the way I unwrapped/the variables values. Fundamentally 4 I think I was trying to print something 3 using string interpolation that could not 2 be printed and that is what caused this 1 error.
More Related questions
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.