EchoMap 2026-07-25 6d3977c
An experimental cross-platform digital signal processing application for sound-source localisation.
Loading...
Searching...
No Matches
App.cpp File Reference

EchoMap entry point. More...

Go to the source code of this file.

Functions

int main ()
 EchoMap common entry point.

Detailed Description

EchoMap entry point.

Author
Oliver Dixon
Date
2026-05-05

Definition in file App.cpp.

Function Documentation

◆ main()

int main ( )

EchoMap common entry point.

Returns
OS status exit code. 0 for success, 1 for failure.

Definition at line 23 of file App.cpp.

24{
25 try {
26#if defined(__EMSCRIPTEN__) || defined(__DOXYGEN__)
27
28 // NOLINTBEGIN(*-owning-memory, *-cplusplus.NewDeleteLeaks) - Emscripten will manage our heap memory.
29
30 auto* const application = new echomap::EchoMapWeb();
31 [[maybe_unused]] auto* const controller = new echomap::StaticInstanceController(*application);
32 application->run_event_loop();
33
34 // NOLINTEND(*-owning-memory, *-cplusplus.NewDeleteLeaks)
35
36#else
37
38 // Native platforms can use the RAII facilities of EchoMap and StaticInstanceController.
39
40 echomap::EchoMapNative application;
41 const echomap::StaticInstanceController instance_controller(application);
42 application.run_event_loop();
43
44#endif
45 } catch (const echomap::ConfigurationError& error) {
46 echomap::Logger::log(echomap::Logger::Level::Error, error.what(), error.where());
47 return 1;
48 }
49
50 return 0;
51}
A ConfigurationError indicates an error encountered during the initial configuration of the EchoMap g...
EchoMap application implementation for native (non-WebAssembly) platforms.
void run_event_loop() override
Runs the platform-dependent event loop to manage and propagate interaction with the EchoMap applicati...
EchoMap application implementation for WebAssembly/Emscripten platforms.
const std::source_location & where() const noexcept
Retrieves the location of the throwing statement.
static void log(Level level, std::string_view message, std::source_location location=std::source_location::current())
Log an unformatted message to the backend.
Definition Logger.cpp:22
Provides a binding interface to connect static controllers to an instance of EchoMap.
T what(T... args)