dsp Class Reference

#include <dsp.h>

Inheritance diagram for dsp:

service_base dsp_v2

List of all members.

Public Types

enum  { END_OF_TRACK = 1, FLUSH = 2 }
typedef dsp t_interface
typedef service_base t_interface_parent

Public Member Functions

virtual void run (dsp_chunk_list *p_chunk_list, const metadb_handle_ptr &p_cur_file, int p_flags)=0
virtual void flush ()=0
 Flushes the DSP (reinitializes / drops any buffered data). Called after seeking, etc.
virtual double get_latency ()=0
virtual bool need_track_change_mark ()=0
void run_abortable (dsp_chunk_list *p_chunk_list, const metadb_handle_ptr &p_cur_file, int p_flags, abort_callback &p_abort)

Static Public Attributes

static const GUID class_guid


Detailed Description

Instance of a DSP.
Implementation: Derive from dsp_impl_base instead of deriving from dsp directly.
Instantiation: Use dsp_entry static helper methods to instantiate DSPs, or dsp_chain_config / dsp_manager to deal with entire DSP chains.

Member Typedef Documentation

Reimplemented from service_base.


Member Enumeration Documentation

anonymous enum

Enumerator:
END_OF_TRACK  Flush whatever you need to when tracks change.
FLUSH  Flush everything.


Member Function Documentation

virtual void dsp::run ( dsp_chunk_list p_chunk_list,
const metadb_handle_ptr p_cur_file,
int  p_flags 
) [pure virtual]

Parameters:
p_chunk_list List of chunks to process. The implementation may alter the list in any way, inserting chunks of different sample rate / channel configuration etc.
p_cur_file Optional, location of currently decoded file. May be null.
p_flags Flags. Can be null, or a combination of END_OF_TRACK and FLUSH constants.

virtual void dsp::flush (  )  [pure virtual]

Flushes the DSP (reinitializes / drops any buffered data). Called after seeking, etc.

virtual double dsp::get_latency (  )  [pure virtual]

Retrieves amount of data buffered by the DSP, for syncing visualisation.

Returns:
Amount of buffered audio data, in seconds.

virtual bool dsp::need_track_change_mark (  )  [pure virtual]

Returns true if DSP needs to know exact track change point (eg. for crossfading, removing silence).
Signaling this will force-flush any DSPs placed before this DSP so when it gets END_OF_TRACK, relevant chunks contain last samples of the track.
Signaling this will often break regular gapless playback so don't use it unless you have reasons to.

void dsp::run_abortable ( dsp_chunk_list p_chunk_list,
const metadb_handle_ptr p_cur_file,
int  p_flags,
abort_callback &  p_abort 
)


Member Data Documentation

const GUID dsp::class_guid [static]

Initial value:

{ 0x2a42afea, 0x940b, 0x455b, { 0xae, 0xff, 0xcf, 0xda, 0xca, 0xf5, 0x2a, 0xff } }


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

Generated on Fri Apr 18 13:56:50 2008 for foobar2000 SDK by  doxygen 1.5.5