# HG changeset patch # User Chris Cannam # Date 1407339884 -3600 # Node ID 405a2ad601f4c474b0c36c9369b45c3a06dc772f # Parent 8e94604ccff2588cfb8f3e32de21405a5440af18 drand48 isn't so portable and we don't really need high-quality randomness, use rand instead diff -r 8e94604ccff2 -r 405a2ad601f4 src/EM.cpp --- 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(m_noteCount); m_updatePitches = allocate(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(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 {