Mercurial > hg > svapp
comparison audioio/ClipMixer.cpp @ 345:a4b8f0864835 tony_integration
Fix omission of note playback level
| author | Chris Cannam | 
|---|---|
| date | Tue, 08 Apr 2014 17:59:33 +0100 | 
| parents | 4fdf70be6671 | 
| children | 8d7f39df44ed | 
   comparison
  equal
  deleted
  inserted
  replaced
| 340:c11701af6bb4 | 345:a4b8f0864835 | 
|---|---|
| 133 float *levels = new float[m_channels]; | 133 float *levels = new float[m_channels]; | 
| 134 | 134 | 
| 135 foreach (NoteStart note, m_playing) { | 135 foreach (NoteStart note, m_playing) { | 
| 136 | 136 | 
| 137 for (int c = 0; c < m_channels; ++c) { | 137 for (int c = 0; c < m_channels; ++c) { | 
| 138 levels[c] = gain; | 138 levels[c] = note.level * gain; | 
| 139 } | 139 } | 
| 140 if (note.pan != 0.0 && m_channels == 2) { | 140 if (note.pan != 0.0 && m_channels == 2) { | 
| 141 levels[0] *= 1.0 - note.pan; | 141 levels[0] *= 1.0 - note.pan; | 
| 142 levels[1] *= note.pan + 1.0; | 142 levels[1] *= note.pan + 1.0; | 
| 143 } | 143 } | 
