iitb-dev / SAS-Example-App

Example App demonstrating use of SAS-Library
0 stars 0 forks source link

App crash case in AudioRecord #7

Closed nageshnayak closed 2 years ago

nageshnayak commented 2 years ago

Reproducible steps: Press Initialize Press Set Path Press Play Recording App crashes

Need to check if same steps cause crash in media recorder

SomnathS09 commented 2 years ago

setOutputFile() method creates a blank FileName.wav(without headers) file, but MediaPlayer cannot play blank files and returns IOException.

nageshnayak commented 2 years ago

Can't we handle the exception rather than crashing?

SomnathS09 commented 2 years ago

Yes, we can. I'll add a toast message saying "Can't play this file"

nageshnayak commented 2 years ago

Check needed in MediaRecorder build as well

SomnathS09 commented 2 years ago

Mediarecorder also has the check, can you give reproducible steps?

nageshnayak commented 2 years ago

Reproducible steps: Press Initialize Press Set Path Press Prepare Press Play Recording App crashes

nageshnayak commented 2 years ago

Same sequence works fine for AudioRecord build