blob: 30b2cca83b3d25054509cdc3dfa620629ba8bcca [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-loop/default.h>
#include <lib/async/cpp/task.h>
#include <lib/syslog/cpp/log_settings.h>
#include <lib/syslog/cpp/macros.h>
#include "src/lib/fxl/command_line.h"
#include "src/media/audio/examples/tones/tones.h"
int main(int argc, const char** argv) {
fuchsia_logging::SetTags({"tones"});
fxl::CommandLine command_line = fxl::CommandLineFromArgcArgv(argc, argv);
async::Loop loop(&kAsyncLoopConfigAttachToCurrentThread);
examples::Tones tones(command_line.HasOption("interactive"), [&loop]() {
async::PostTask(loop.dispatcher(), [&loop]() { loop.Quit(); });
});
loop.Run();
return 0;
}