Attaching an inline function to AudioFile.setContentCallback causes a crash
-
Snippet here:
HiseSnippet 1060.3oc0Vs0aaTDEdlXunZCHQo4AdbTDO3HUrrKkRgJD4hiAKRRshCU7fEQS1833QY1YVM6rtXg3WHuvC7Cg+AvY10q8tItFWSRkvxxxy417cNy4Vei1Ghi0FBs14Si.B8C7FLUYGe3XtPQ50gPejGOIPnGIjfOWJuj6eM4foQ73XHfPoU9NmfzZUIoe9qu8.tjq7gEjHjWoE9vwhPgcA0968CBorKO.NWDVP5mtWOes5PsTmffphWKRDdi7qfS4Nw1xiPeuiBDVsYfkagXBs5A5foCFqesJS9WIhEWJA2g1jAngxH2UKCbH1Qkb3XgLnetyGSHTu9KBEUxBEa6chHPLm9hPxGkxfsPihwC5VkgWkRvqcQ30p.7VBjnEfT0LH8PuA9FQjcAGGddeudJKXFwwvdQnjIKYq+j5cnFkPYaFxuF5ZvCy0nwyZ05wL7mceQ85BkTn.1nDkuUnUr4O8Wj+12X25+Z8Zn4h0RnYjQnrM147whXF9kWPCle1Uxx0r4N3M7a0qizisrIbCaemrGq0Q8k7ofoM6aXoIeMuBro7FvCijvbmswNoTYNUXyzwYzEVjOBswMM6by0EgUiT+jOpYLXmETNL20ts2t6KlGJzpS0V3kpr..5HraxZznkxycKFsTBlkx1k9aVkhMTIgWBlGiNnLAlKHlSTNQy6MmnUrNX1yRAA0pdJg8kQf5MUcPlEov+8i85vsbW14LZnbQfwJbPf1Alfk5Y4p075.wWa0QXw9sRjwRHcPhjaKWW4ZlLiAFCJkL6RXUwB6zhMatyJ1VWH9Pu9Bq+3kiwsVBFwH08AFm0h5C8NZzHv2t.fU859S2O8iJd8OJ+5mWqAYsh1161knqXbwertiKhV6wEXGDe74AJllj9lctAKnEpqJdUNXdjhi9ePQxmo0VWIcwwUY8hvnnwhlujzvDvDW1BtVMYSr9YuNe8vLkiGN.IisD+dzWF1wjDlFmJQl8jg6K0XOXghYGCrywGpgc0Ip.vvNv.7qYeF6qZwtLJr4q4SHgtvoG0cmg7ew8W9uSIRzroPMmmL0QCx4SqrpYns2vYnUuulgVc8xYWM79ePWnRi7qkiwABWxyQpIfDqyRw3Gi8VGwSj1bpkKxNQqzQi0Jge47TqQb0UfoH1WpCsu05VyaNks26LPB73BEDe5dGiaJvM2rT6sHVz9sd8mk9d8IdYvk45Lv9u7t8NMMakSRprVSRtyw6lOU4tAJmoSrXG5S3XhpqW1oIgCvF69.hDkBjtsbna41GI6bq71aC.UP5g+F+LiYa2Y5LlsyY9N4NB49F8E9Y6u4xkePJEzuUoyDp4ch6LqMIcmthuwgXWwK78Kapao3S1TE+7MUwmtoJ9EaphOaSU7K2TEe9+thtgV6mX0gYkrDxI8OJcgXJc9dDzJj+ALyaNo.
Repro case:
- Load an audio file into the provided Audio Loop Player by right-clicking the waveform view and choosing a file.
- You will get a crash.
Basically this crashes:
Content.makeFrontInterface(600, 600); inline function audiofile_callback() { Console.print("This is an audiofile content callback."); } const var AudioLoopPlayer1 = Synth.getAudioSampleProcessor("Audio Loop Player1"); const var af = AudioLoopPlayer1.getAudioFile(0); af.setContentCallback(audiofile_callback);
But this does not crash:
Content.makeFrontInterface(600, 600); inline function audiofile_callback() { Console.print("This is an audiofile content callback."); } const var AudioLoopPlayer1 = Synth.getAudioSampleProcessor("Audio Loop Player1"); const var af = AudioLoopPlayer1.getAudioFile(0); af.setContentCallback(function(){ Console.print("This is an audiofile content callback."); });
I think this is a genuine crash bug ?
I'm on Windows 11 and I'm running this commit on the develop branch:
58ed548 - - added missing files from MIR -
And related to this, other callbacks you can assign to multiple objects in a for loop. However the setContentCallback does not seem to work when trying to assign to multiple samplers within a for loop. Only the first one ever gets assigned.
-
@Christoph-Hart This seems to be fixed by commit: 5a83aef - - revert & remove compile error at argument mismatch (for now)...
-