Runs DSP on the specified chunk list.
24 TRACK_CALL_TEXT(
"dsp_manager::run");
27 #if defined(_MSC_VER) && defined(_M_IX86) 36 if (iter->m_dsp->need_track_change_mark()) flush_mark = iter;
43 bool recycle_available =
true;
52 iter->m_recycle_flag =
false;
59 t_size data_mismatch_count = 0;
60 t_size owner_mismatch_count = 0;
63 while(iter_src.is_valid() && iter_dst.is_valid()) {
64 if (iter_src->m_preset.get_owner() != iter_dst->m_preset.get_owner()) {
65 owner_mismatch_count++;
66 }
else if (iter_src->m_preset != iter_dst->m_preset) {
67 data_mismatch_count++;
69 ++iter_src; ++iter_dst;
71 recycle_available = (owner_mismatch_count == 0 && data_mismatch_count <= 1);
73 recycle_available =
false;
76 if (recycle_available) {
79 while(iter_src.is_valid() && iter_dst.is_valid()) {
80 if (iter_src->m_preset == iter_dst->m_preset) {
81 iter_src->m_recycle_flag =
true;
82 iter_dst->m_dsp = iter_src->m_dsp;
84 ++iter_src; ++iter_dst;
89 if (iter->m_dsp.is_empty()) {
95 bool flushflag = flush_mark.is_valid();
97 unsigned flags2 = p_flags;
98 if (iter == flush_mark) flushflag =
false;
99 if (flushflag || !iter->m_recycle_flag) flags2|=
dsp::FLUSH;
100 dsp_run(iter,p_list,p_cur_file,flags2,latency,p_abort);
111 bool flushflag = flush_mark.is_valid();
113 unsigned flags2 = p_flags;
114 if (iter == flush_mark) flushflag =
false;
116 dsp_run(iter,p_list,p_cur_file,flags2,latency,p_abort);
::pfc::const_iterator< t_item > const_iterator
::pfc::iterator< t_item > iterator
Flush whatever you need to when tracks change.
static bool g_dsp_exists(const GUID &p_guid)
pfc::chain_list_v2_t< t_dsp_chain_entry > t_dsp_chain
virtual GUID get_owner() const =0
static bool g_instantiate(service_ptr_t< dsp > &p_out, const dsp_preset &p_preset)
void dsp_run(t_dsp_chain::const_iterator p_iter, dsp_chunk_list *list, const metadb_handle_ptr &cur_file, unsigned flags, double &latency, abort_callback &)
const dsp_preset & get_item(t_size p_index) const
dsp_chain_config_impl m_config
PFC_NORETURN void SHARED_EXPORT uBugCheck()