diff options
author | Jean-Baptiste Queru <jbq@google.com> | 2012-09-06 16:08:29 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-09-06 16:08:29 -0700 |
commit | 4a213147dbe60416aa26ebdba0f3c631b2e2b013 (patch) | |
tree | 774c653848a2fb399bd4e640cd3941e599cca807 /arm-wt-22k/lib_src/eas_xmf.c | |
parent | 0eb1fab72466cd5900470d0a4a2b191722aa9ef5 (diff) | |
parent | 274d0571979c10a8c0bfe2641ada32a310248f13 (diff) | |
download | android_external_sonivox-cm-10.1.0-RC3.tar.gz android_external_sonivox-cm-10.1.0-RC3.tar.bz2 android_external_sonivox-cm-10.1.0-RC3.zip |
am 274d0571: Merge "Added support for parsing XMF versions 1.00 and 1.01 headers"cm-10.1.3-RC2cm-10.1.3-RC1cm-10.1.3cm-10.1.2cm-10.1.1cm-10.1.0-RC5cm-10.1.0-RC4cm-10.1.0-RC3cm-10.1.0-RC2cm-10.1.0-RC1cm-10.1.0cm-10.1-M3cm-10.1-M2cm-10.1-M1mr1.1-stagingcm-10.1
* commit '274d0571979c10a8c0bfe2641ada32a310248f13':
Added support for parsing XMF versions 1.00 and 1.01 headers
Diffstat (limited to 'arm-wt-22k/lib_src/eas_xmf.c')
-rw-r--r-- | arm-wt-22k/lib_src/eas_xmf.c | 45 |
1 files changed, 28 insertions, 17 deletions
diff --git a/arm-wt-22k/lib_src/eas_xmf.c b/arm-wt-22k/lib_src/eas_xmf.c index 0a92425..05b329e 100644 --- a/arm-wt-22k/lib_src/eas_xmf.c +++ b/arm-wt-22k/lib_src/eas_xmf.c @@ -43,6 +43,8 @@ /* XMF header file type */ #define XMF_IDENTIFIER 0x584d465f +#define XMF_VERSION_1_00 0x312e3030 +#define XMF_VERSION_1_01 0x312e3031 #define XMF_VERSION_2_00 0x322e3030 #define XMF_FILE_TYPE 0x00000002 #define XMF_SPEC_LEVEL 0x00000001 @@ -126,27 +128,36 @@ static EAS_RESULT XMF_CheckFileType (S_EAS_DATA *pEASData, EAS_FILE_HANDLE fileH /* read the version */ if ((result = EAS_HWGetDWord(pEASData->hwInstData, fileHandle, &temp, EAS_TRUE)) != EAS_SUCCESS) return result; - if (temp != XMF_VERSION_2_00) - { - { /* dpp: EAS_ReportEx(_EAS_SEVERITY_ERROR, "XMF file version was 0x%08x, expected 0x%08x\n", temp, XMF_VERSION_2_00); */ } - return EAS_SUCCESS; - } - /* read the file type */ - if ((result = EAS_HWGetDWord(pEASData->hwInstData, fileHandle, &temp, EAS_TRUE)) != EAS_SUCCESS) - return result; - if (temp != XMF_FILE_TYPE) + if (temp == XMF_VERSION_2_00) { - { /* dpp: EAS_ReportEx(_EAS_SEVERITY_ERROR, "XMF file type was 0x%08x, expected 0x%08x\n", temp, XMF_FILE_TYPE); */ } - return EAS_SUCCESS; - } + /* read the file type */ + result = EAS_HWGetDWord(pEASData->hwInstData, fileHandle, &temp, EAS_TRUE); + if (result != EAS_SUCCESS) + return result; - /* read the spec level */ - if ((result = EAS_HWGetDWord(pEASData->hwInstData, fileHandle, &temp, EAS_TRUE)) != EAS_SUCCESS) - return result; - if (temp != XMF_SPEC_LEVEL) + if (temp != XMF_FILE_TYPE) + { + { /* dpp: EAS_ReportEx(_EAS_SEVERITY_ERROR, + "XMF file type was 0x%08x, expected 0x%08x\n", temp, XMF_FILE_TYPE); */ } + return EAS_SUCCESS; + } + + /* read the spec level */ + result = EAS_HWGetDWord(pEASData->hwInstData, fileHandle, &temp, EAS_TRUE); + if (result != EAS_SUCCESS) + return result; + + if (temp != XMF_SPEC_LEVEL) + { + { /* dpp: EAS_ReportEx(_EAS_SEVERITY_ERROR, + "XMF file spec was 0x%08x, expected 0x%08x\n", temp, XMF_SPEC_LEVEL); */ } + return EAS_SUCCESS; + } + } + else if (temp != XMF_VERSION_1_00 && temp != XMF_VERSION_1_01) { - { /* dpp: EAS_ReportEx(_EAS_SEVERITY_ERROR, "XMF file spec was 0x%08x, expected 0x%08x\n", temp, XMF_SPEC_LEVEL); */ } + { /* dpp: EAS_ReportEx(_EAS_SEVERITY_ERROR, "XMF file version was 0x%08x\n", temp); */ } return EAS_SUCCESS; } |