MCPcopy Create free account
hub / github.com/LabSound/LabSound / MakeOfflineAudioContext

Function MakeOfflineAudioContext

src/extended/LabSound.cpp:61–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61std::unique_ptr<lab::AudioContext> MakeOfflineAudioContext(
62 const AudioStreamConfig & offlineConfig, double recordTimeMilliseconds)
63{
64 LOG_TRACE("MakeOfflineAudioContext(duration)");
65
66 const double secondsToRun = recordTimeMilliseconds * 0.001;
67
68 std::unique_ptr<AudioContext> ctx(new lab::AudioContext(true));
69 ctx->setDeviceNode(std::make_shared<lab::NullDeviceNode>(*ctx.get(), offlineConfig, secondsToRun));
70 ctx->lazyInitialize();
71 return ctx;
72}
73
74OfflineContext MakeOfflineAudioContext(const AudioStreamConfig & offlineConfig)
75{

Callers 1

playMethod · 0.85

Calls 3

setDeviceNodeMethod · 0.80
getMethod · 0.80
lazyInitializeMethod · 0.80

Tested by

no test coverage detected