foobar2000 SDK  2015-08-03
Public Member Functions | Private Attributes
dsp_preset_reader

#include <dsp.h>

+ Inheritance diagram for dsp_preset_reader:

Public Member Functions

 dsp_preset_reader ()
 
 dsp_preset_reader (const dsp_preset_reader &p_source)
 
void init (const dsp_preset &p_preset)
 
bool is_finished ()
 
t_size read (void *p_buffer, t_size p_bytes, abort_callback &p_abort)
 

Private Attributes

pfc::array_t< t_uint8m_data
 
t_size m_walk
 

Detailed Description

Definition at line 231 of file dsp.h.

Constructor & Destructor Documentation

dsp_preset_reader::dsp_preset_reader ( )
inline

Definition at line 233 of file dsp.h.

233 : m_walk(0) {}
t_size m_walk
Definition: dsp.h:248
dsp_preset_reader::dsp_preset_reader ( const dsp_preset_reader p_source)
inline

Definition at line 234 of file dsp.h.

234 : m_walk(0) {*this = p_source;}
t_size m_walk
Definition: dsp.h:248

Member Function Documentation

void dsp_preset_reader::init ( const dsp_preset p_preset)
inline

Definition at line 235 of file dsp.h.

235  {
236  m_data.set_data_fromptr( (const t_uint8*) p_preset.get_data(), p_preset.get_data_size() );
237  m_walk = 0;
238  }
uint8_t t_uint8
Definition: int_types.h:9
virtual const void * get_data() const =0
pfc::array_t< t_uint8 > m_data
Definition: dsp.h:249
virtual t_size get_data_size() const =0
void set_data_fromptr(const t_source *p_buffer, t_size p_count)
Warning: buffer pointer must not point to buffer allocated by this array (fixme). ...
Definition: array.h:139
t_size m_walk
Definition: dsp.h:248
bool dsp_preset_reader::is_finished ( )
inline

Definition at line 246 of file dsp.h.

246 {return m_walk == m_data.get_size();}
pfc::array_t< t_uint8 > m_data
Definition: dsp.h:249
t_size m_walk
Definition: dsp.h:248
t_size get_size() const
Definition: array.h:130
t_size dsp_preset_reader::read ( void *  p_buffer,
t_size  p_bytes,
abort_callback p_abort 
)
inline

Definition at line 239 of file dsp.h.

239  {
240  p_abort.check();
241  t_size todo = pfc::min_t<t_size>(p_bytes,m_data.get_size()-m_walk);
242  memcpy(p_buffer,m_data.get_ptr()+m_walk,todo);
243  m_walk += todo;
244  return todo;
245  }
const t_item * get_ptr() const
Definition: array.h:213
pfc::array_t< t_uint8 > m_data
Definition: dsp.h:249
size_t t_size
Definition: int_types.h:48
t_size m_walk
Definition: dsp.h:248
t_size get_size() const
Definition: array.h:130

Field Documentation

pfc::array_t<t_uint8> dsp_preset_reader::m_data
private

Definition at line 249 of file dsp.h.

t_size dsp_preset_reader::m_walk
private

Definition at line 248 of file dsp.h.


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