When reading a file from a disc media, it may fail due to a damage/smear on the disc surface. (A read error)
To detect a read error by Atom library, appropriate processes need to be taken in the following modules.
ACF
ACB
AtomEx player
AWB
Atom player
Error Check in ACF Registration
If a read error occurs in ACF file registration by the criAtomEx_RegisterAcfFile function, the criAtomEx_RegisterAcfFile function returns CRI_FALSE.
If a read error detection is needed, check the return value of the criAtomEx_RegisterAcfFile function, and perform an appropriate process. (e.g. displaying an error message.)
[Note]
When registering ACF information using the ::criAtomEx_RegisterAcfConfig function or the criAtomEx_RegisterAcfData function, an error check is not needed.
Error Check in ACB Loading
If a read error occurs in ACB file loading using the criAtomExAcb_LoadAcbFile function, the criAtomExAcb_LoadAcbFile function returns CRI_NULL.
If a read error detection is needed, check the return value of the criAtomExAcb_LoadAcbFile function, and perform an appropriate process. (e.g. displaying an error message.)
[Note]
When loading on-memory ACB data using the criAtomExAcb_LoadAcbData function, an error check is not needed.
Error Check in File Playback by AtomEx Player
If a read error occurs during sound data streaming playback, the AtomEx player status changes to an error.
AtomEx player status can be acquired by the criAtomExPlayer_GetStatus function.
If a read error detection is needed, check the AtomEx player status at some interval, and set an appropriate action. (e.g. displaying an error message.)
When a read error occurs at loading TOC information of AWB file by the criAtomAwb_LoadToc function, the criAtomAwb_LoadToc function returns CRI_FALSE.
If a read error detection is needed, check the return value of the criAtomAwb_LoadToc function, and set an appropriate action. (e.g. displaying an error message.)
During Asynchronous TOC Information Read-In
When a read error occurs at loading TOC information of AWB file by the criAtomAwb_LoadTocAsync function, AWB handle status changes to an error. AWB handle status can be acquired by the criAtomAwb_GetStatus function.
If user needs to detect a read error, check the AWB handle status periodically during reading TOC information, and take an appropriate action when an error occurs. (e.g. displaying an error message.)
[Note]
An error check is not needed when loading an on-memory ACB data using the criAtomExAcb_LoadAcbData function.
Error Check in File Playback by Atom Player
When a read error occurs during streaming a sound data, the Atom player status changes to an error.
The Atom player status can be acquired by the criAtomPlayer_GetStatus function.
If user needs to detect a read error, check the Atom player status periodically, and perform an appropriate process when an error occur. (e.g. displaying an error message.)