Hi All,
This is with regards to a capturing and rendering solution that we are developing. We are facing a problem when rendering audio data. We find that the write to the sound device fails after a certain interval of time. Described below is a brief of our implementation:
We have a function that fetches encoded frames of data, decodes them and writes the same to a sound device. The functions that achieve this are:
- Loader_getFrame();
- Adec1_process();
- Sound_write();
This implementation runs fine for some time but then the call to Sound_write() fails with error returned as DMAI_EIO. The duration after which the error occurs is random in nature. Sometimes it occurs in a few minutes, and sometimes after a few hours. On debugging further we found that the DMAI framework returns the error as:
[Sound] Error writing data to sound device(Input/output error)
To avoid this error we have tried various work-arounds as:
- writing data to the sound device in a separate thread
- accumulating a certain amount of data before giving it to sound write
- using buffers in ping-pong fashion to give to sound device so that the buffer into which the data is decoded does not overlap with the buffer that is been written to the sound device.
But, we have not succeeded as yet in resolving the issue. Kindly guide us as to how we should implement the solution to avoid this error. Details of our development environment are:
1. Development on DM6467-t processor
2.dvsdk version 3_10_00_16
3.dmai version 2_10_00_10
Let me know if anyone requires any further details. Thanking all in advance. Awaiting an early reply.
Regards,
Veenit