paraslash Paraslash Audio Streaming
About   News   Download   Documentation   Development

Data Structures | Macros | Functions
wma.h File Reference

The asf_header structure and public wma function declarations. More...

Data Structures

struct  asf_header_info
 Information contained in an asf audio file header. More...
 

Macros

#define WMA_FRAME_SKIP   31
 

Functions

__a_const int wma_log2 (unsigned int v)
 Compute the base-2 logarithm. More...
 
const char * search_pattern (const char *pattern, int pattern_len, const char *buf, int buf_size)
 Find the first occurrence of the given pattern. More...
 
int read_asf_header (const char *buf, int loaded, struct asf_header_info *ahi)
 Read an asf audio file header. More...
 

Detailed Description

The asf_header structure and public wma function declarations.

Macro Definition Documentation

◆ WMA_FRAME_SKIP

#define WMA_FRAME_SKIP   31

Function Documentation

◆ wma_log2()

__a_const int wma_log2 ( unsigned int  v)

Compute the base-2 logarithm.

Parameters
vThe value to compute the logarithm of.
Returns
An integer approximation of log2(v).

◆ search_pattern()

const char* search_pattern ( const char *  pattern,
int  pattern_len,
const char *  buf,
int  buf_size 
)

Find the first occurrence of the given pattern.

Parameters
patternThe pattern to search for.
pattern_lenThe length of the pattern in bytes.
bufThe buffer to search for the pattern.
buf_sizeThe number of bytes in buf.
Returns
A pointer into buf or NULL if the pattern was not found.

References PARA_DEBUG_LOG, and PARA_NOTICE_LOG.

◆ read_asf_header()

int read_asf_header ( const char *  buf,
int  loaded,
struct asf_header_info ahi 
)

Read an asf audio file header.

Parameters
bufThe input buffer.
loadedNumber of bytes in buf.
ahiResult pointer.
Returns
Negative on errors, zero if more data is needed in order to read the full header, 1 on success.

References asf_header_info::header_len.