Ignore:
Timestamp:
Sep 18, 2006 11:33:44 PM (18 years ago)
Author:
bennylp
Message:

Support for reading non-canonical WAV file in WAV file player port.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/include/pjmedia/wave.h

    r518 r727  
    9797typedef struct pjmedia_wave_hdr pjmedia_wave_hdr; 
    9898 
     99/** 
     100 * This structure describes generic RIFF subchunk header. 
     101 */ 
     102typedef struct pjmedia_wave_subchunk 
     103{ 
     104    pj_uint32_t     id;                 /**< Subchunk ASCII tag.            */ 
     105    pj_uint32_t     len;                /**< Length following this field    */ 
     106} pjmedia_wave_subchunk; 
     107 
     108 
     109/** 
     110 * Normalize subchunk header from little endian (the representation of 
     111 * RIFF file) into host's endian. 
     112 */ 
     113#if defined(PJ_IS_BIG_ENDIAN) && PJ_IS_BIG_ENDIAN!=0 
     114#   define PJMEDIA_WAVE_NORMALIZE_SUBCHUNK(ch)  \ 
     115            do { \ 
     116                (ch)->id = pj_swap32((ch)->id); \ 
     117                (ch)->len = pj_swap32((ch)->len); \ 
     118            } while (0) 
     119#else 
     120#   define PJMEDIA_WAVE_NORMALIZE_SUBCHUNK(ch) 
     121#endif 
     122 
    99123 
    100124/** 
Note: See TracChangeset for help on using the changeset viewer.