Skip to content

Commit 7fbb08b

Browse files
committed
core: fix random-source initialization with model_id and global seed
1 parent 5603a0f commit 7fbb08b

File tree

5 files changed

+222
-135
lines changed

5 files changed

+222
-135
lines changed

app/gui/application.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1055,7 +1055,8 @@ void application::start_init_source(const project_id pj_id,
10551055
source src(random_id);
10561056
chunk_type tmp{};
10571057
src.buffer = tmp;
1058-
(void)c->init(src, data);
1058+
(void)c->init(
1059+
0x648593178264597, enum_cast<model_id>(id), src, data);
10591060

10601061
data_ed.fill_plot(tmp);
10611062
}

app/gui/project-external-source-editor.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1307,11 +1307,11 @@ void show_menu_external_sources(application& app,
13071307

13081308
if (random_ptr) {
13091309
src.reset();
1310-
if (auto ret = random_ptr->init(src, src_data); !ret) {
1311-
app.jn.push(log_level::error, [](auto& t, auto&) {
1312-
t = "Fail to initalize random source";
1313-
});
1314-
}
1310+
// if (auto ret = random_ptr->init(src, src_data); !ret) {
1311+
// app.jn.push(log_level::error, [](auto& t, auto&) {
1312+
// t = "Fail to initalize random source";
1313+
// });
1314+
// }
13151315
}
13161316
}
13171317

0 commit comments

Comments
 (0)