What's the proper way to handle audio output device lost?

23 views
Skip to first unread message

cwouyang

unread,
Dec 7, 2016, 4:28:06 AM12/7/16
to Native-Client-Discuss
Hi there:
I had the requirement to resume the playback of audio when the output device is lost and recovered. But as I know now, there is no such callback functions in PPAPI, notifying the status changed of output device. If there really exists one, I then could recreate pp::Audio and start the playing again. Is there anything I missing?
My current approach is monitoring the period of callback function to submit buffers. If the period exceeds some time estimated, I assume that the pp::Audio was gone and just keep trying to recreate it. Although it seems working, I wonder if there is a better way to achieve this.
Reply all
Reply to author
Forward
0 new messages