Main Page Modules Class Hierarchy Compound List File List Compound Members File Members

# MuseDecMp3 Class Reference

`#include <dec_mp3.h>`

Inherits MuseDec.

Inheritance diagram for MuseDecMp3:

[legend]
Collaboration diagram for MuseDecMp3:

[legend]
List of all members.

## Detailed Description

Mpeg-1 layer 1,2,3 and Mpeg-2 layer 3.

Instances of the Mp3 codec (splay implementation) are created internally by the Channel class, publicly available interface to the creation is in Stream_mixer::add_to_playlist.

Definition at line 45 of file dec_mp3.h.

## Public Member Functions
int | load (char *file)
| open file in decoder
bool | seek (float pos)
| seek to a position
void | clean ()
IN_DATATYPE * | get_audio ()
| decode a chunk of channel audio

## Member Function Documentation

IN_DATATYPE * MuseDecMp3::get_audio | ( |  | ) | `[virtual]`

| decode a chunk of channel audio Decode another chunk of audio for the channel at the current position, this function is implementing the low-level decoder functionalities to obtain the audio pcm to be mixed. The audio will be then resampled at a common rate and mixed by MuSE. This is a pure virtual function: needs to be implemented in decoders. Returns: pointer to decoded pcm buffer Implements MuseDec. Definition at line 118 of file dec_mp3.cpp.

int MuseDecMp3::load | ( | char * | file | ) | `[virtual]`

  | open file in decoder Open up a filename (full path) and makes it ready for decoding, the filename or url can be formed in different ways, depending on the decoder implementation. This is a pure virtual function: needs to be implemented in decoders. Parameters:
  file | full pathname for file, or url accepted by the decoder
Returns: 0 on error, otherwise 1 = success, channel is seekable 2 = success, channel is not seekable Implements MuseDec. Definition at line 46 of file dec_mp3.cpp.

bool MuseDecMp3::seek | ( | float | pos | ) | `[virtual]`

  | seek to a position Seek position over the audio data available to an opened channel. This operation is only possible if the channel is seekable (see the flag in this class and the return code of MuseDec::load). This is a pure virtual function: needs to be implemented in decoders. Parameters:
  pos | floating point value from 0.0 to 1.0
Returns: true on success, false otherwise Implements MuseDec. Definition at line 193 of file dec_mp3.cpp.

The documentation for this class was generated from the following files:

- dec_mp3.h
- dec_mp3.cpp