Unable to play audio file based on conditions applied || Simulink Support Package for Android Devices
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello,
I was building an app to playback audio when a sensor data reaches a certain value
In the below model, I am able to deploy this model into my android devices by setting a constant value to the switch block.
The Below Switch block has a condition that if value is greater than 42, the audio plays without any issue.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/388853/image.jpeg)
Now Instead of the Constant 43 block, I intend to use the mobile accelerometer data to play audio when the above condtion is true.
But I get an error with regards to the audio file size which is irrelevant to the unchanged audio file.
I hope someone can help me out with this
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/388858/image.jpeg)
댓글 수: 0
채택된 답변
Sutanu Maiti
2020년 10월 23일
Check sample time of each block present in the model. Looks like audio playback block is driven too fast.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Modeling에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!