Mercurial > hg > silvet
changeset 281:405a2ad601f4
drand48 isn't so portable and we don't really need high-quality randomness, use rand instead
author | Chris Cannam |
---|---|
date | Wed, 06 Aug 2014 16:44:44 +0100 |
parents | 8e94604ccff2 |
children | f9023a87072d |
files | src/EM.cpp |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/EM.cpp Wed Aug 06 15:55:26 2014 +0100 +++ b/src/EM.cpp Wed Aug 06 16:44:44 2014 +0100 @@ -45,7 +45,7 @@ m_pitches = allocate<float>(m_noteCount); m_updatePitches = allocate<float>(m_noteCount); for (int n = 0; n < m_noteCount; ++n) { - m_pitches[n] = drand48(); + m_pitches[n] = float(rand()) / RAND_MAX; } if (useShifts) { @@ -53,7 +53,7 @@ m_updateShifts = allocate_channels<float>(m_shiftCount, m_noteCount); for (int f = 0; f < m_shiftCount; ++f) { for (int n = 0; n < m_noteCount; ++n) { - m_shifts[f][n] = drand48(); + m_shifts[f][n] = float(rand()) / RAND_MAX; } } } else {