Mema
Memory Matrix — multi-channel audio matrix monitor and router
Loading...
Searching...
No Matches
HeadlessCLIMenu.h
Go to the documentation of this file.
1
/* Copyright (c) 2026, Christian Ahrens
2
*
3
* This file is part of Mema <https://github.com/ChristianAhrens/Mema>
4
*
5
* This tool is free software; you can redistribute it and/or modify it under
6
* the terms of the GNU Lesser General Public License version 3.0 as published
7
* by the Free Software Foundation.
8
*
9
* This tool is distributed in the hope that it will be useful, but WITHOUT
10
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12
* details.
13
*
14
* You should have received a copy of the GNU Lesser General Public License
15
* along with this tool; if not, write to the Free Software Foundation, Inc.,
16
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17
*/
18
19
#pragma once
20
21
#include <JuceHeader.h>
22
23
namespace
Mema
24
{
25
26
class
MemaProcessor;
27
66
class
HeadlessCLIMenu
:
public
juce::Thread
67
{
68
public
:
74
explicit
HeadlessCLIMenu
(
MemaProcessor
& processor);
75
81
~HeadlessCLIMenu
()
override
;
82
89
void
run
()
override
;
90
91
private
:
92
// -------------------------------------------------------------------------
94
95
102
juce::String readLine();
103
111
void
callOnMessageThread(std::function<
void
()> fn);
112
114
115
// -------------------------------------------------------------------------
117
118
120
void
printSeparator();
121
126
void
printHeader(
const
juce::String& title);
127
129
void
printPrompt();
130
132
133
// -------------------------------------------------------------------------
135
136
142
int
getActiveInputCount();
143
149
int
getActiveOutputCount();
150
152
153
// -------------------------------------------------------------------------
158
159
166
void
runMainMenu();
167
173
void
runInputMutesMenu();
174
180
void
runOutputMutesMenu();
181
189
void
runMatrixMenu();
190
206
void
runAudioDeviceMenu();
207
216
void
runPluginMenu();
217
227
void
runPluginParametersMenu();
228
230
231
// -------------------------------------------------------------------------
236
237
244
void
doLoadConfig();
245
251
void
doSaveConfig();
252
254
255
// -------------------------------------------------------------------------
257
MemaProcessor
& m_processor;
258
264
bool
m_quit =
false
;
265
266
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(
HeadlessCLIMenu
)
267
};
268
269
}
// namespace Mema
Mema::HeadlessCLIMenu
Interactive, numbered-menu CLI for configuring Mema when running with –headless.
Definition
HeadlessCLIMenu.h:67
Mema::HeadlessCLIMenu::~HeadlessCLIMenu
~HeadlessCLIMenu() override
Destructor — stops the background thread (up to 3 s timeout).
Definition
HeadlessCLIMenu.cpp:47
Mema::HeadlessCLIMenu::run
void run() override
Thread entry point — shows the main menu in a loop until the user quits.
Definition
HeadlessCLIMenu.cpp:56
Mema::MemaProcessor
Core audio processor — owns the AudioDeviceManager, routing matrix, plugin host, and IPC server.
Definition
MemaProcessor.h:156
Mema
Definition
HeadlessCLIMenu.cpp:30
Source
HeadlessCLIMenu.h
Generated by
1.9.8