WARNING: The online documentation has moved to https://docs.pjsip.org.

Visit the new documentation at https://docs.pjsip.org:

BLOG | DOCUMENTATION | GITHUB

Home --> Documentations --> PJMEDIA Reference

Representation of RIFF/WAVE file format. More...

Data Structures

struct  pjmedia_wave_hdr
 
struct  pjmedia_wave_subchunk
 

Macros

#define PJMEDIA_RIFF_TAG   ('F'<<24|'F'<<16|'I'<<8|'R')
 
#define PJMEDIA_WAVE_TAG   ('E'<<24|'V'<<16|'A'<<8|'W')
 
#define PJMEDIA_FMT_TAG   (' '<<24|'t'<<16|'m'<<8|'f')
 
#define PJMEDIA_DATA_TAG   ('a'<<24|'t'<<16|'a'<<8|'d')
 
#define PJMEDIA_FACT_TAG   ('t'<<24|'c'<<16|'a'<<8|'f')
 
#define PJMEDIA_WAVE_NORMALIZE_SUBCHUNK(ch)
 

Enumerations

enum  pjmedia_wave_fmt_tag {
  PJMEDIA_WAVE_FMT_TAG_PCM = 1 ,
  PJMEDIA_WAVE_FMT_TAG_ALAW = 6 ,
  PJMEDIA_WAVE_FMT_TAG_ULAW = 7
}
 

Functions

void pjmedia_wave_hdr_file_to_host (pjmedia_wave_hdr *hdr)
 
void pjmedia_wave_hdr_host_to_file (pjmedia_wave_hdr *hdr)
 

Detailed Description

This the the low level representation of RIFF/WAVE file format. For higher abstraction, please see WAV File Player and File Writer (Recorder).

Macro Definition Documentation

◆ PJMEDIA_RIFF_TAG

#define PJMEDIA_RIFF_TAG   ('F'<<24|'F'<<16|'I'<<8|'R')

Standard RIFF tag to identify RIFF file format in the WAVE header.

◆ PJMEDIA_WAVE_TAG

#define PJMEDIA_WAVE_TAG   ('E'<<24|'V'<<16|'A'<<8|'W')

Standard WAVE tag to identify WAVE header.

◆ PJMEDIA_FMT_TAG

#define PJMEDIA_FMT_TAG   (' '<<24|'t'<<16|'m'<<8|'f')

Standard FMT tag to identify format chunks.

◆ PJMEDIA_DATA_TAG

#define PJMEDIA_DATA_TAG   ('a'<<24|'t'<<16|'a'<<8|'d')

Standard DATA tag to identify data chunks.

◆ PJMEDIA_FACT_TAG

#define PJMEDIA_FACT_TAG   ('t'<<24|'c'<<16|'a'<<8|'f')

Standard FACT tag to identify fact chunks.

◆ PJMEDIA_WAVE_NORMALIZE_SUBCHUNK

#define PJMEDIA_WAVE_NORMALIZE_SUBCHUNK (   ch)

Normalize subchunk header from little endian (the representation of RIFF file) into host's endian.

Enumeration Type Documentation

◆ pjmedia_wave_fmt_tag

Enumeration of format compression tag.

Function Documentation

◆ pjmedia_wave_hdr_file_to_host()

void pjmedia_wave_hdr_file_to_host ( pjmedia_wave_hdr hdr)

On big-endian hosts, this function swaps the byte order of the values in the WAVE header fields. On little-endian hosts, this function does nothing.

Application SHOULD call this function after reading the WAVE header chunks from a file.

Parameters
hdrThe WAVE header.

◆ pjmedia_wave_hdr_host_to_file()

void pjmedia_wave_hdr_host_to_file ( pjmedia_wave_hdr hdr)

On big-endian hosts, this function swaps the byte order of the values in the WAVE header fields. On little-endian hosts, this function does nothing.

Application SHOULD call this function before writing the WAVE header to a file.

Parameters
hdrThe WAVE header.

References PJ_END_DECL.

 


PJMEDIA small footprint Open Source media stack
Copyright (C) 2006-2008 Teluu Inc.