foobar2000 SDK  2015-08-03
Public Member Functions
audio_chunk_partial_ref

#include <audio_chunk.h>

+ Inheritance diagram for audio_chunk_partial_ref:

Public Member Functions

 audio_chunk_partial_ref (const audio_chunk &chunk, t_size base, t_size count)
 
- Public Member Functions inherited from audio_chunk_memref_impl
 audio_chunk_memref_impl (const audio_sample *p_data, t_size p_samples, t_uint32 p_sample_rate, t_uint32 p_channels, t_uint32 p_channel_config)
 
unsigned get_channel_config () const
 
unsigned get_channels () const
 
audio_sampleget_data ()
 
const audio_sampleget_data () const
 
t_size get_data_size () const
 
t_size get_sample_count () const
 
unsigned get_srate () const
 
void set_channels (unsigned p_count, unsigned p_config)
 
void set_data_size (t_size p_new_size)
 
void set_sample_count (t_size val)
 
void set_srate (unsigned val)
 
- Public Member Functions inherited from audio_chunk
void allocate (size_t size)
 
void copy (const audio_chunk &p_source)
 
unsigned get_channel_count () const
 
size_t get_data_length () const
 
double get_duration () const
 
audio_sample get_peak (audio_sample p_peak) const
 
audio_sample get_peak () const
 
unsigned get_sample_rate () const
 
spec_t get_spec () const
 
size_t get_used_size () const
 
void grow_data_size (t_size p_requested)
 
void insert_silence_fromstart (t_size samples)
 
bool is_empty () const
 
bool is_spec_valid () const
 
bool is_valid () const
 
const audio_chunkoperator= (const audio_chunk &p_source)
 
void pad_with_silence (t_size samples)
 
void pad_with_silence_ex (t_size samples, unsigned hint_nch, unsigned hint_srate)
 
bool process_skip (double &skipDuration)
 
void reset ()
 
void scale (audio_sample p_value)
 
void set_channels (unsigned val)
 
void set_data (const audio_sample *src, t_size samples, unsigned nch, unsigned srate, unsigned channel_config)
 
void set_data (const audio_sample *src, t_size samples, unsigned nch, unsigned srate)
 
void set_data_32 (const float *src, t_size samples, unsigned nch, unsigned srate)
 
void set_data_fixedpoint (const void *ptr, t_size bytes, unsigned srate, unsigned nch, unsigned bps, unsigned channel_config)
 
void set_data_fixedpoint_ex (const void *ptr, t_size bytes, unsigned p_sample_rate, unsigned p_channels, unsigned p_bits_per_sample, unsigned p_flags, unsigned p_channel_config)
 
void set_data_fixedpoint_ms (const void *ptr, size_t bytes, unsigned sampleRate, unsigned channels, unsigned bps, unsigned channelConfig)
 
void set_data_fixedpoint_signed (const void *ptr, t_size bytes, unsigned srate, unsigned nch, unsigned bps, unsigned channel_config)
 
void set_data_floatingpoint_ex (const void *ptr, t_size bytes, unsigned p_sample_rate, unsigned p_channels, unsigned p_bits_per_sample, unsigned p_flags, unsigned p_channel_config)
 
void set_data_int16 (const int16_t *src, t_size samples, unsigned nch, unsigned srate, unsigned channel_config)
 
void set_sample_rate (unsigned val)
 
void set_silence (t_size samples)
 
void set_silence_seconds (double seconds)
 
void set_spec (const spec_t &)
 
t_size skip_first_samples (t_size samples)
 
bool to_raw_data (class mem_block_container &out, t_uint32 bps, bool useUpperBits=true, float scale=1.0) const
 
bool toFixedPoint (class mem_block_container &out, uint32_t bps, uint32_t bpsValid, bool useUpperBits=true, float scale=1.0) const
 

Additional Inherited Members

- Public Types inherited from audio_chunk
enum  { sample_rate_min = 1000, sample_rate_max = 2822400 }
 
enum  {
  channel_front_left = 1<<0, channel_front_right = 1<<1, channel_front_center = 1<<2, channel_lfe = 1<<3,
  channel_back_left = 1<<4, channel_back_right = 1<<5, channel_front_center_left = 1<<6, channel_front_center_right = 1<<7,
  channel_back_center = 1<<8, channel_side_left = 1<<9, channel_side_right = 1<<10, channel_top_center = 1<<11,
  channel_top_front_left = 1<<12, channel_top_front_center = 1<<13, channel_top_front_right = 1<<14, channel_top_back_left = 1<<15,
  channel_top_back_center = 1<<16, channel_top_back_right = 1<<17, channel_config_mono = channel_front_center, channel_config_stereo = channel_front_left | channel_front_right,
  channel_config_5point1 = channel_front_left | channel_front_right | channel_front_center | channel_lfe | channel_back_left | channel_back_right, channel_config_5point1_side = channel_front_left | channel_front_right | channel_front_center | channel_lfe | channel_side_left | channel_side_right, channel_config_7point1 = channel_config_5point1 | channel_side_left | channel_side_right, defined_channel_count = 18
}
 
enum  { FLAG_LITTLE_ENDIAN = 1, FLAG_BIG_ENDIAN = 2, FLAG_SIGNED = 4, FLAG_UNSIGNED = 8 }
 
- Static Public Member Functions inherited from audio_chunk
static unsigned flags_autoendian ()
 
static unsigned g_channel_config_from_wfx (uint32_t p_wfx)
 
static uint32_t g_channel_config_to_wfx (unsigned p_config)
 
static unsigned g_channel_index_from_flag (unsigned p_config, unsigned p_flag)
 
static const char * g_channel_name (unsigned p_flag)
 
static const char * g_channel_name_byidx (unsigned p_index)
 
static unsigned g_count_channels (unsigned p_config)
 
static unsigned g_extract_channel_flag (unsigned p_config, unsigned p_index)
 
static unsigned g_find_channel_idx (unsigned p_flag)
 
static void g_formatChannelMaskDesc (unsigned flags, pfc::string_base &out)
 
static unsigned g_guess_channel_config (unsigned count)
 
static unsigned g_guess_channel_config_xiph (unsigned count)
 
static bool g_is_valid_sample_rate (t_uint32 p_val)
 
static bool g_toFixedPoint (const audio_sample *in, void *out, size_t count, uint32_t bps, uint32_t bpsValid, bool useUpperBits=true, float scale=1.0)
 
static spec_t makeSpec (uint32_t rate, uint32_t channels)
 
static spec_t makeSpec (uint32_t rate, uint32_t channels, uint32_t chanMask)
 
- Protected Member Functions inherited from audio_chunk
 audio_chunk ()
 
 ~audio_chunk ()
 

Detailed Description

Definition at line 378 of file audio_chunk.h.

Constructor & Destructor Documentation

audio_chunk_partial_ref::audio_chunk_partial_ref ( const audio_chunk chunk,
t_size  base,
t_size  count 
)
inline

Definition at line 380 of file audio_chunk.h.

380 : audio_chunk_temp_impl(chunk.get_data() + base * chunk.get_channels(), count, chunk.get_sample_rate(), chunk.get_channels(), chunk.get_channel_config()) {}
audio_chunk_memref_impl audio_chunk_temp_impl
Definition: audio_chunk.h:310
unsigned get_sample_rate() const
Helper, same as get_srate().
Definition: audio_chunk.h:103
virtual unsigned get_channels() const =0
Retrieves channel count of contained audio data.
virtual unsigned get_channel_config() const =0
Retrieves channel map of contained audio data. Conditions where number of channels specified by chann...
virtual audio_sample * get_data()=0
Retrieves audio data buffer pointer (non-const version). Returned pointer is for temporary use only; ...

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