Main Page   Data Structures   File List   Data Fields   Globals  

mp3.h File Reference

#include <sys/stat.h>
#include <string.h>
#include <mad.h>
#include <ao/ao.h>
#include <stdbool.h>
#include "daisylibao.h"
#include "audio.h"
#include "libdaisy.h"

Go to the source code of this file.

Data Structures

struct  audio_dither

Defines

#define DITHER_MAGIC   0xC69AA8EC

Functions

void mp3_init (struct_audio_data_t *data)
bool mp3_play (struct_audio_data_t *data)
void mp3_close (struct_audio_data_t *data)


Define Documentation

#define DITHER_MAGIC   0xC69AA8EC
 

Definition at line 46 of file mp3.h.

Referenced by audio_linear_dither(), free_dither(), init_dither(), and reset_dither().


Function Documentation

void mp3_close struct_audio_data_t   data
 

Closes the decoder. This function must be called when you are done using the mp3 decoder.

Parameters:
struct_audio_data_t  *data - pointer to the data struct.

Definition at line 583 of file mp3.c.

References struct_audio_data_t::device, and libao_terminate().

Referenced by audio_decoder(), and audio_terminate().

void mp3_init struct_audio_data_t   data
 

Initializes the decoder. This function must be called before audio_play or any atemt to use the mp3 decoder.

Parameters:
struct_audio_data_t  *data - pointer to the data struct TODO: Return something useful on error instead of reporting a critical error (and possibly die).

Definition at line 530 of file mp3.c.

References struct_audio_data_t::cb_error, struct_audio_data_t::daisy, DAISY_ERROR_AUDIO_DATA_IS_NULL, struct_audio_data_t::device, struct_audio_data_t::mutex, struct_audio_data_t::progress, REP_CRITICAL, REP_DEBUG, and report().

Referenced by audio_decoder().

bool mp3_play struct_audio_data_t   data
 

Plays a file segment. This function will play a file from the start to the stop that is deinfed in the data struct.

Parameters:
struct_audio_data_t  *data - pointer to the data struct.
Returns:
bool - returns false.

Definition at line 558 of file mp3.c.

References struct_audio_data_t::fdm, struct_audio_data_t::file_name, mp3_decode(), struct_audio_data_t::mutex, struct_audio_data_t::progress, REP_DEBUG, report(), and STRLEN.

Referenced by audio_decoder().


Generated on Tue Sep 5 12:14:08 2006 for libdaisy by doxygen1.2.15