blob: 511d67f7cb20173da856c30b7a3d65a4460c5d45 [file] [log] [blame]
// Copyright 2017 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <lib/async-loop/cpp/loop.h>
#include <lib/async/cpp/task.h>
#include <iostream>
#include "garnet/bin/media/wav_recorder/wav_recorder.h"
#include "lib/component/cpp/startup_context.h"
#include "lib/fxl/command_line.h"
int main(int argc, const char** argv) {
async::Loop loop(&kAsyncLoopConfigAttachToThread);
auto startup_context = component::StartupContext::CreateFromStartupInfo();
media::tools::WavRecorder wav_recorder(
fxl::CommandLineFromArgcArgv(argc, argv), [&loop]() {
async::PostTask(loop.dispatcher(), [&loop]() { loop.Quit(); });
});
wav_recorder.Run(startup_context.get());
loop.Run();
return 0;
}