summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2012-05-08 22:47:51 -0400
committerMichael Sevakis <jethead71@rockbox.org>2012-05-08 22:47:51 -0400
commitd26a35d10b9e2f808b0e4880d5b5d1a2963258e9 (patch)
tree1a3eb65ef3143cf286d101376fb475be45ef2236
parent87a9951cf8014c86a022bf05c9c025b65067811f (diff)
downloadrockbox-d26a35d10b9e2f808b0e4880d5b5d1a2963258e9.tar.gz
rockbox-d26a35d10b9e2f808b0e4880d5b5d1a2963258e9.zip
Tweak dsp_format_change_process (default format handler).
Just stop searching if the entry is found (as it should have been). Change-Id: Id968694e825282d58c8ca4a7789c236f98643a5f
-rw-r--r--lib/rbcodec/dsp/dsp_core.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/rbcodec/dsp/dsp_core.c b/lib/rbcodec/dsp/dsp_core.c
index 175b9c1c64..84a23a4c83 100644
--- a/lib/rbcodec/dsp/dsp_core.c
+++ b/lib/rbcodec/dsp/dsp_core.c
@@ -128,13 +128,15 @@ static void dsp_format_change_process(struct dsp_proc_entry *this,
128 128
129 /* We don't keep back references to the DSP, so just search for it */ 129 /* We don't keep back references to the DSP, so just search for it */
130 struct dsp_config *dsp; 130 struct dsp_config *dsp;
131 for (int i = 0; (dsp = dsp_get_config(i)); i++) 131 for (unsigned int i = 0; (dsp = dsp_get_config(i)); i++)
132 { 132 {
133 struct dsp_proc_slot *slot = find_proc_slot(dsp, id); 133 /* Found one with the id, check if it's this one
134 /* Found one with the id, check if it's this one */ 134 (NULL return doesn't matter) */
135 if (&slot->proc_entry == this && dsp_proc_active(dsp, id)) 135 if (&find_proc_slot(dsp, id)->proc_entry == this)
136 { 136 {
137 dsp_proc_call(this, buf_p, 0); 137 if (dsp_proc_active(dsp, id))
138 dsp_proc_call(this, buf_p, 0);
139
138 break; 140 break;
139 } 141 }
140 } 142 }