Ardour  9.0-pre0-582-g084a23a80d
ARDOUR::Mp3FileImportableSource Class Reference

#include <mp3fileimportable.h>

Inheritance diagram for ARDOUR::Mp3FileImportableSource:
[legend]

Public Member Functions

 Mp3FileImportableSource (const std::string &path)
 
virtual ~Mp3FileImportableSource ()
 
uint32_t channels () const
 
samplecnt_t length () const
 
samplecnt_t samplerate () const
 
samplepos_t natural_position () const
 
void seek (samplepos_t pos)
 
samplecnt_t read (Sample *, samplecnt_t nframes)
 
bool clamped_at_unity () const
 
samplecnt_t layer () const
 
samplecnt_t bitrate () const
 
samplecnt_t read_unlocked (Sample *, samplepos_t start, samplecnt_t cnt, uint32_t chn)
 
- Public Member Functions inherited from ARDOUR::ImportableSource
 ImportableSource ()
 
virtual ~ImportableSource ()
 
virtual float ratio () const
 

Private Member Functions

void unmap_mem ()
 
int decode_mp3 (bool parse_only=false)
 

Private Attributes

mp3dec_t _mp3d
 
mp3dec_frame_info_t _info
 
samplecnt_t _length
 
int _fd
 
const uint8_t * _map_addr
 
size_t _map_length
 
const uint8_t * _buffer
 
size_t _remain
 
samplepos_t _read_position
 
mp3d_sample_t _pcm [(1152 *2)]
 
size_t _pcm_off
 
int _n_frames
 

Detailed Description

Definition at line 44 of file mp3fileimportable.h.

Constructor & Destructor Documentation

◆ Mp3FileImportableSource()

ARDOUR::Mp3FileImportableSource::Mp3FileImportableSource ( const std::string &  path)

◆ ~Mp3FileImportableSource()

virtual ARDOUR::Mp3FileImportableSource::~Mp3FileImportableSource ( )
virtual

Member Function Documentation

◆ bitrate()

samplecnt_t ARDOUR::Mp3FileImportableSource::bitrate ( ) const
inline

Definition at line 60 of file mp3fileimportable.h.

◆ channels()

uint32_t ARDOUR::Mp3FileImportableSource::channels ( ) const
inlinevirtual

Implements ARDOUR::ImportableSource.

Definition at line 50 of file mp3fileimportable.h.

◆ clamped_at_unity()

bool ARDOUR::Mp3FileImportableSource::clamped_at_unity ( ) const
inlinevirtual

Implements ARDOUR::ImportableSource.

Definition at line 57 of file mp3fileimportable.h.

◆ decode_mp3()

int ARDOUR::Mp3FileImportableSource::decode_mp3 ( bool  parse_only = false)
private

◆ layer()

samplecnt_t ARDOUR::Mp3FileImportableSource::layer ( ) const
inline

Definition at line 59 of file mp3fileimportable.h.

◆ length()

samplecnt_t ARDOUR::Mp3FileImportableSource::length ( ) const
inlinevirtual

Implements ARDOUR::ImportableSource.

Definition at line 51 of file mp3fileimportable.h.

◆ natural_position()

samplepos_t ARDOUR::Mp3FileImportableSource::natural_position ( ) const
inlinevirtual

Implements ARDOUR::ImportableSource.

Definition at line 53 of file mp3fileimportable.h.

◆ read()

samplecnt_t ARDOUR::Mp3FileImportableSource::read ( Sample ,
samplecnt_t  nframes 
)
virtual

◆ read_unlocked()

samplecnt_t ARDOUR::Mp3FileImportableSource::read_unlocked ( Sample ,
samplepos_t  start,
samplecnt_t  cnt,
uint32_t  chn 
)

◆ samplerate()

samplecnt_t ARDOUR::Mp3FileImportableSource::samplerate ( ) const
inlinevirtual

Implements ARDOUR::ImportableSource.

Definition at line 52 of file mp3fileimportable.h.

◆ seek()

void ARDOUR::Mp3FileImportableSource::seek ( samplepos_t  pos)
virtual

◆ unmap_mem()

void ARDOUR::Mp3FileImportableSource::unmap_mem ( )
private

Member Data Documentation

◆ _buffer

const uint8_t* ARDOUR::Mp3FileImportableSource::_buffer
private

Definition at line 75 of file mp3fileimportable.h.

◆ _fd

int ARDOUR::Mp3FileImportableSource::_fd
private

Definition at line 71 of file mp3fileimportable.h.

◆ _info

mp3dec_frame_info_t ARDOUR::Mp3FileImportableSource::_info
private

Definition at line 68 of file mp3fileimportable.h.

◆ _length

samplecnt_t ARDOUR::Mp3FileImportableSource::_length
private

Definition at line 69 of file mp3fileimportable.h.

◆ _map_addr

const uint8_t* ARDOUR::Mp3FileImportableSource::_map_addr
private

Definition at line 72 of file mp3fileimportable.h.

◆ _map_length

size_t ARDOUR::Mp3FileImportableSource::_map_length
private

Definition at line 73 of file mp3fileimportable.h.

◆ _mp3d

mp3dec_t ARDOUR::Mp3FileImportableSource::_mp3d
private

Definition at line 67 of file mp3fileimportable.h.

◆ _n_frames

int ARDOUR::Mp3FileImportableSource::_n_frames
private

Definition at line 81 of file mp3fileimportable.h.

◆ _pcm

mp3d_sample_t ARDOUR::Mp3FileImportableSource::_pcm[(1152 *2)]
private

Definition at line 79 of file mp3fileimportable.h.

◆ _pcm_off

size_t ARDOUR::Mp3FileImportableSource::_pcm_off
private

Definition at line 80 of file mp3fileimportable.h.

◆ _read_position

samplepos_t ARDOUR::Mp3FileImportableSource::_read_position
private

Definition at line 78 of file mp3fileimportable.h.

◆ _remain

size_t ARDOUR::Mp3FileImportableSource::_remain
private

Definition at line 76 of file mp3fileimportable.h.


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