Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AudioServicesPlaySystemSound and the main thread

Is it considered good practice to put calls to AudioServicesPlaySystemSound in a queue to avoid blocking the main thread? Is this something that people do?

like image 997
John Topley Avatar asked Apr 30 '12 16:04

John Topley


1 Answers

I was asking myself the same question and use to put this call in a background thread. It is really not needed. According to this article the sound is already played in a background thread and you don't know exactly when it will be played. I also verify this behavior in my own code.

like image 143
tiguero Avatar answered Nov 09 '22 18:11

tiguero