foobar2000 SDK
2015-08-03
|
#include <dsp.h>
Public Types | |
enum | { END_OF_TRACK = 1, FLUSH = 2 } |
Public Types inherited from service_base | |
typedef service_base | t_interface |
Public Member Functions | |
FB2K_MAKE_SERVICE_INTERFACE (dsp, service_base) | |
virtual void | flush ()=0 |
virtual double | get_latency ()=0 |
virtual bool | need_track_change_mark ()=0 |
virtual void | run (dsp_chunk_list *p_chunk_list, const metadb_handle_ptr &p_cur_file, int p_flags)=0 |
void | run_abortable (dsp_chunk_list *p_chunk_list, const metadb_handle_ptr &p_cur_file, int p_flags, abort_callback &p_abort) |
Public Member Functions inherited from service_base | |
template<typename outPtr_t > | |
bool | cast (outPtr_t &outPtr) |
virtual int | service_add_ref ()=0 throw () |
virtual bool | service_query (service_ptr_t< service_base > &p_out, const GUID &p_guid) |
template<class T > | |
bool | service_query_t (service_ptr_t< T > &p_out) |
virtual int | service_release ()=0 throw () |
Additional Inherited Members | |
Protected Member Functions inherited from service_base | |
service_base () | |
~service_base () | |
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.
anonymous enum |
dsp::FB2K_MAKE_SERVICE_INTERFACE | ( | dsp | , |
service_base | |||
) |
|
pure virtual |
Flushes the DSP (reinitializes / drops any buffered data). Called after seeking, etc.
|
pure virtual |
Retrieves amount of data buffered by the DSP, for syncing visualisation.
|
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.
|
pure virtual |
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. |
Implemented in dsp_v2.
void dsp::run_abortable | ( | dsp_chunk_list * | p_chunk_list, |
const metadb_handle_ptr & | p_cur_file, | ||
int | p_flags, | ||
abort_callback & | p_abort | ||
) |
Definition at line 378 of file dsp.cpp.