This chapter covers the result you get from Ringtone Creator Server and means of identifying whether conversion was successful or not and if not then why.
About 0.5% of thousands and thousands of ringtones our software has converted for our direct customers turned to be invalid due to multiple reasons: either the file format was specified incorrectly, or a transmission error occurred, or any other unpredictable thing happened. That's why you have to be prepared for the inevitable: some ringtones might not be converted because of slight problems with them.
Ringtone Creator Server provides capabilities to determine the status of conversion and provide the extra information needed for correct handing of resulting ringtones. Output from Ringtone Creator Server has the following structure:
<result_code>((<error_code><error_message>)|(<status_code>(<data>|<pcm-data>))<duration>)
Here:
| <result_code> | byte. Takes one of the following values: FF – error, the error code and message follow; 00 – operation was successful |
| <error_code> | byte. Represents an error (if any). Please refer to the <error_message> for details. |
| <error_message> | plain-text (ISO-8859–1) error description. The list of error codes and messages follows:
Error Code: 1
Error Code: 2
Error Code: 3
Error Code: 4
Error Code: 5
Error Code: 6
Error Code: 7
Error Code: 8
Error Code: 9
Error Code: 10
Error Code: 11
Error Code: 12 |
| <status_code> | byte. Status code tells you about events you may be interested in.
00 – No messages. This event is unlikely if you're dealing with polyphonic ringtones If more than 1 status is applicable, the first to occur is returned back. |
| <data> | Byte array representing the resulting ringtone or an empty array (i.e. byte[0]). |
| <pcm-data> | A text line in the following format:
|
| <duration> | 4 bytes parameter representing the duration of a ringtone in milliseconds. It's the last parameter, so you can determine the size of the ringtone using the following formula:
You can get the duration by calculating:
NOTE: if you don't want to get these four trailing bytes, please append the following parameter to your request: |