commit 745eaa09f2ce572b56bf5acf0c3b2901a66ddcf0 parent bce78598538276b4a38186189a5f0d03f5c48451 Author: fundamental <mark.d.mccurry@gmail.com> Date: Tue, 29 Dec 2009 12:29:16 -0500 Master: Optimization - Avoid mixing nonactive Parts Diffstat:
M | src/Misc/Master.cpp | | | 8 | +++++--- |
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/Misc/Master.cpp b/src/Misc/Master.cpp @@ -366,9 +366,11 @@ void Master::AudioOut(REALTYPE *outl, REALTYPE *outr) //Mix all parts for(npart = 0; npart < NUM_MIDI_PARTS; npart++) { - for(i = 0; i < SOUND_BUFFER_SIZE; i++) { //the volume did not changed - outl[i] += part[npart]->partoutl[i]; - outr[i] += part[npart]->partoutr[i]; + if(part[npart]->Penabled) { //only mix active parts + for(i = 0; i < SOUND_BUFFER_SIZE; i++) { //the volume did not changed + outl[i] += part[npart]->partoutl[i]; + outr[i] += part[npart]->partoutr[i]; + } } }