File tree Expand file tree Collapse file tree 4 files changed +15
-19
lines changed
include/soul/3rdParty/choc/containers
soul_venue_audioplayer/audio_player Expand file tree Collapse file tree 4 files changed +15
-19
lines changed Original file line number Diff line number Diff line change @@ -557,7 +557,8 @@ class ValueView final
557
557
@see Value::serialise
558
558
*/
559
559
template <typename Handler>
560
- static void deserialise (InputData&, Handler&& handleResult);
560
+ static void deserialise (InputData&, Handler&& handleResult,
561
+ Allocator* allocator = nullptr );
561
562
562
563
private:
563
564
// ==============================================================================
@@ -2231,11 +2232,10 @@ void ValueView::serialise (OutputStream& output) const
2231
2232
}
2232
2233
2233
2234
template <typename Handler>
2234
- void ValueView::deserialise (InputData& input, Handler&& handleResult)
2235
+ void ValueView::deserialise (InputData& input, Handler&& handleResult, Allocator* allocator )
2235
2236
{
2236
- FixedPoolAllocator<8192 > localAllocator;
2237
2237
ValueView result;
2238
- result.type = Type::deserialise (input, std::addressof (localAllocator) );
2238
+ result.type = Type::deserialise (input, allocator );
2239
2239
auto valueDataSize = result.type .getValueDataSize ();
2240
2240
Type::SerialisationHelpers::expect (input.end >= input.start + valueDataSize);
2241
2241
result.data = const_cast <uint8_t *> (input.start );
Original file line number Diff line number Diff line change @@ -228,28 +228,24 @@ struct RenderingVenue::Pimpl
228
228
venue.removeActiveSession (*this );
229
229
}
230
230
231
- bool load (BuildBundle build , CompileTaskFinishedCallback loadFinishedCallback) override
231
+ bool load (const Program& program , CompileTaskFinishedCallback loadFinishedCallback) override
232
232
{
233
233
unload ();
234
234
235
- if (build. sourceFiles . empty ())
235
+ if (program. isEmpty ())
236
236
return false ;
237
237
238
- taskQueue.addTask ([this , build = std::move (build) ,
238
+ taskQueue.addTask ([this , program ,
239
239
callback = std::move (loadFinishedCallback)] (TaskThread::ShouldStopFlag& cancelled)
240
240
{
241
241
CompileMessageList messageList;
242
+ bool ok = performer->load (messageList, program);
242
243
243
- if (auto program = Compiler::build (messageList, build))
244
- {
245
- bool ok = performer->load (messageList, program);
246
-
247
- if (cancelled)
248
- return ;
244
+ if (cancelled)
245
+ return ;
249
246
250
- if (ok)
251
- setState (SessionState::loaded);
252
- }
247
+ if (ok)
248
+ setState (SessionState::loaded);
253
249
254
250
callback (messageList);
255
251
});
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ class Venue
72
72
getInputEndpoints() and getOutputEndpoints() methods become available, so you can query
73
73
and connect them to data sources before calling link().
74
74
*/
75
- virtual bool load (BuildBundle , CompileTaskFinishedCallback loadFinishedCallback) = 0;
75
+ virtual bool load (const Program& , CompileTaskFinishedCallback loadFinishedCallback) = 0;
76
76
77
77
/* * When a program has been loaded, this returns a list of the input endpoints that
78
78
the program provides.
Original file line number Diff line number Diff line change @@ -51,9 +51,9 @@ struct AudioPlayerVenue::Pimpl : private AudioMIDISystem::Callback
51
51
unload ();
52
52
}
53
53
54
- bool load (BuildBundle build , CompileTaskFinishedCallback loadFinishedCallback) override
54
+ bool load (const Program& program , CompileTaskFinishedCallback loadFinishedCallback) override
55
55
{
56
- return session->load (std::move (build) ,
56
+ return session->load (program ,
57
57
[clientCallback = std::move (loadFinishedCallback)] (const CompileMessageList& messages)
58
58
{
59
59
clientCallback (messages);
You can’t perform that action at this time.
0 commit comments