summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2013-07-11 11:38:46 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2013-07-11 11:38:46 -0400
commitf47499f1579c47a15ebcdbcdc5f830748b05cc3c (patch)
tree602b295cbf9fe7a73e47a4574a7fd3db89c5cb9c /libs
parent27eecdc88b8db2d89efcc1205dd437466d50f058 (diff)
Use g_random_int instead of ::random for portability
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/broadcast_info.cc2
-rw-r--r--libs/ardour/test/midi_clock_slave_test.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/libs/ardour/broadcast_info.cc b/libs/ardour/broadcast_info.cc
index a7fa41aaf9..78c6132f85 100644
--- a/libs/ardour/broadcast_info.cc
+++ b/libs/ardour/broadcast_info.cc
@@ -84,7 +84,7 @@ BroadcastInfo::set_originator_ref_from_session (Session const & /*session*/)
/* random code is 9 digits */
- int random_code = random() % 999999999;
+ int random_code = g_random_int() % 999999999;
/* Serial number is 12 chars */
diff --git a/libs/ardour/test/midi_clock_slave_test.cc b/libs/ardour/test/midi_clock_slave_test.cc
index dcb159cb2c..4349df22eb 100644
--- a/libs/ardour/test/midi_clock_slave_test.cc
+++ b/libs/ardour/test/midi_clock_slave_test.cc
@@ -27,7 +27,7 @@ MIDIClock_SlaveTest::testStepResponse ()
for (framecnt_t i = 1; i<= 100 * period_size; i++) {
// simulate jitter
- framecnt_t input_delta = framecnt_t (one_ppqn_in_frames + 0.1 * (double(random()) / double (RAND_MAX)) * one_ppqn_in_frames);
+ framecnt_t input_delta = framecnt_t (one_ppqn_in_frames + 0.1 * (double(g_random_int()) / double (RAND_MAX)) * one_ppqn_in_frames);
if (i % input_delta == 0) {
update_midi_clock (*parser, start_time + i);