v1.0.21 release
- Performance improvements, TooB Convolution Reverb, Cab IR. - Bug fix:CabIR Impulses #2 and #3 load wrong file. - Bug fix: Android client upload file extensions
This commit is contained in:
+2
-2
@@ -1,10 +1,10 @@
|
|||||||
cmake_minimum_required(VERSION 3.16.0)
|
cmake_minimum_required(VERSION 3.16.0)
|
||||||
project(pipedal
|
project(pipedal
|
||||||
VERSION 1.1.20
|
VERSION 1.1.21
|
||||||
DESCRIPTION "PiPedal Guitar Effect Pedal For Raspberry Pi"
|
DESCRIPTION "PiPedal Guitar Effect Pedal For Raspberry Pi"
|
||||||
HOMEPAGE_URL "https://rerdavies.github.io/pipedal"
|
HOMEPAGE_URL "https://rerdavies.github.io/pipedal"
|
||||||
)
|
)
|
||||||
set (DISPLAY_VERSION "v1.1.20")
|
set (DISPLAY_VERSION "v1.1.21")
|
||||||
|
|
||||||
set (CMAKE_INSTALL_PREFIX "/usr/")
|
set (CMAKE_INSTALL_PREFIX "/usr/")
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
<img src='docs/GithubBanner.png' width="100%" /><br/>
|
<img src='docs/GithubBanner.png' width="100%" /><br/>
|
||||||
|
|
||||||
Download: <a href='https://rerdavies.github.io/pipedal/download.html'>v1.1.20</a>
|
Download: <a href='https://rerdavies.github.io/pipedal/download.html'>v1.1.21</a>
|
||||||
|
|
||||||
Website: [https://rerdavies.github.io/pipedal](https://rerdavies.github.io/pipedal).
|
Website: [https://rerdavies.github.io/pipedal](https://rerdavies.github.io/pipedal).
|
||||||
|
|
||||||
|
|||||||
Vendored
+1
-1
@@ -9,6 +9,6 @@ Package: pipedal
|
|||||||
Pre-Depends: hostapd;authbind;dnsmasq
|
Pre-Depends: hostapd;authbind;dnsmasq
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: sound
|
Section: sound
|
||||||
Version: 1.1.20
|
Version: 1.1.21
|
||||||
Installed-Size: 15147
|
Installed-Size: 15147
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -13,14 +13,14 @@ page_icon: img/Install4.jpg
|
|||||||
|
|
||||||
Download the most recent Debian (.deb) package for your platform:
|
Download the most recent Debian (.deb) package for your platform:
|
||||||
|
|
||||||
- [Ubuntu/Raspberry Pi OS (64-bit) v1.1.20](https://github.com/rerdavies/pipedal/releases/download/v1.1.20/pipedal_1.1.20_arm64.deb)
|
- [Ubuntu/Raspberry Pi OS (64-bit) v1.1.21](https://github.com/rerdavies/pipedal/releases/download/v1.1.21/pipedal_1.1.21_arm64.deb)
|
||||||
|
|
||||||
Install the package by running
|
Install the package by running
|
||||||
|
|
||||||
```
|
```
|
||||||
sudo apt update
|
sudo apt update
|
||||||
cd ~/Downloads
|
cd ~/Downloads
|
||||||
sudo apt-get install ./pipedal_1.1.20_arm64.deb
|
sudo apt-get install ./pipedal_1.1.21_arm64.deb
|
||||||
```
|
```
|
||||||
On Raspberry Pi OS, if you have a graphical desktop installed, you can also install the package by double-clicking on the downloaded package in the File Manager.
|
On Raspberry Pi OS, if you have a graphical desktop installed, you can also install the package by double-clicking on the downloaded package in the File Manager.
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Release Notes
|
# Release Notes
|
||||||
|
|
||||||
## PiPedal 1.1.20
|
## PiPedal 1.1.21
|
||||||
|
|
||||||
Features:
|
Features:
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -4,14 +4,14 @@
|
|||||||
|
|
||||||
Download the most recent Debian (.deb) package for your platform:
|
Download the most recent Debian (.deb) package for your platform:
|
||||||
|
|
||||||
- [Ubuntu or Raspberry Pi OS (64-bit)](https://github.com/rerdavies/pipedal/releases/download/v1.1.20/pipedal_1.1.20_arm64.deb) v1.1.20
|
- [Ubuntu or Raspberry Pi OS (64-bit)](https://github.com/rerdavies/pipedal/releases/download/v1.1.21/pipedal_1.1.21_arm64.deb) v1.1.21
|
||||||
|
|
||||||
Install the package by running
|
Install the package by running
|
||||||
|
|
||||||
```
|
```
|
||||||
sudo apt update
|
sudo apt update
|
||||||
cd ~/Downloads
|
cd ~/Downloads
|
||||||
sudo apt-get install ./pipedal_1.1.20_arm64.deb
|
sudo apt-get install ./pipedal_1.1.21_arm64.deb
|
||||||
```
|
```
|
||||||
|
|
||||||
Follow the instructions in [_Configuring PiPedal After Installation_](https://rerdavies.github.io/pipedal/Configuring.html) to complete the installation.
|
Follow the instructions in [_Configuring PiPedal After Installation_](https://rerdavies.github.io/pipedal/Configuring.html) to complete the installation.
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<img src="GithubBanner.png" width="100%"/>
|
<img src="GithubBanner.png" width="100%"/>
|
||||||
<a href="Installing.html"><i>v1.1.20</i></a>
|
<a href="Installing.html"><i>v1.1.21</i></a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
ToobAmp.so.1.0.8
|
ToobAmp.so.1.0.9
|
||||||
Binary file not shown.
+358
-357
@@ -318,6 +318,7 @@ const AppThemed = withStyles(appStyles)(class extends ResizeResponsiveComponent<
|
|||||||
};
|
};
|
||||||
|
|
||||||
this.errorChangeHandler_ = this.setErrorMessage.bind(this);
|
this.errorChangeHandler_ = this.setErrorMessage.bind(this);
|
||||||
|
this.unmountListener = this.unmountListener.bind(this);
|
||||||
this.stateChangeHandler_ = this.setDisplayState.bind(this);
|
this.stateChangeHandler_ = this.setDisplayState.bind(this);
|
||||||
this.presetChangedHandler = this.presetChangedHandler.bind(this);
|
this.presetChangedHandler = this.presetChangedHandler.bind(this);
|
||||||
this.alertMessageChangedHandler = this.alertMessageChangedHandler.bind(this);
|
this.alertMessageChangedHandler = this.alertMessageChangedHandler.bind(this);
|
||||||
@@ -427,12 +428,10 @@ const AppThemed = withStyles(appStyles)(class extends ResizeResponsiveComponent<
|
|||||||
this.setState({
|
this.setState({
|
||||||
isDrawerOpen: false,
|
isDrawerOpen: false,
|
||||||
});
|
});
|
||||||
if (this.model_.isAndroidHosted())
|
if (this.model_.isAndroidHosted()) {
|
||||||
{
|
|
||||||
this.model_.showAndroidDonationActivity();
|
this.model_.showAndroidDonationActivity();
|
||||||
} else {
|
} else {
|
||||||
if (window)
|
if (window) {
|
||||||
{
|
|
||||||
window.open("https://github.com/sponsors/rerdavies", '_blank');
|
window.open("https://github.com/sponsors/rerdavies", '_blank');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -488,17 +487,18 @@ const AppThemed = withStyles(appStyles)(class extends ResizeResponsiveComponent<
|
|||||||
setFullScreen(this.state.isFullScreen);
|
setFullScreen(this.state.isFullScreen);
|
||||||
this.setState({ isFullScreen: !this.state.isFullScreen });
|
this.setState({ isFullScreen: !this.state.isFullScreen });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private unmountListener(e: Event) {
|
||||||
|
e.preventDefault();
|
||||||
|
if (this.model_.state.get() === State.Ready && !this.model_.isAndroidHosted()) {
|
||||||
|
(e as any).returnValue = "Are you sure you want to leave this page?";
|
||||||
|
return "Are you sure you want to leave this page?";
|
||||||
|
}
|
||||||
|
}
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
|
|
||||||
super.componentDidMount();
|
super.componentDidMount();
|
||||||
|
window.addEventListener("beforeunload",this.unmountListener);
|
||||||
window.addEventListener("beforeunload", (e) => {
|
|
||||||
e.preventDefault();
|
|
||||||
if (this.model_.state.get() === State.Ready) {
|
|
||||||
e.returnValue = "Are you sure you want to leave this page?";
|
|
||||||
return "Are you sure you want to leave this page?";
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
this.model_.errorMessage.addOnChangedHandler(this.errorChangeHandler_);
|
this.model_.errorMessage.addOnChangedHandler(this.errorChangeHandler_);
|
||||||
this.model_.state.addOnChangedHandler(this.stateChangeHandler_);
|
this.model_.state.addOnChangedHandler(this.stateChangeHandler_);
|
||||||
@@ -510,193 +510,168 @@ const AppThemed = withStyles(appStyles)(class extends ResizeResponsiveComponent<
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
updateOverscroll(): void {
|
updateOverscroll(): void {
|
||||||
if (this.model_.serverVersion) {
|
if(this.model_.serverVersion) {
|
||||||
// no pull-down refresh on android devices once we're ready (unless we're debug)
|
// no pull-down refresh on android devices once we're ready (unless we're debug)
|
||||||
let preventOverscroll =
|
let preventOverscroll =
|
||||||
this.model_.state.get() === State.Ready
|
this.model_.state.get() === State.Ready
|
||||||
&& !this.model_.debug;
|
&& !this.model_.debug;
|
||||||
|
|
||||||
let overscrollBehavior = preventOverscroll ? "none" : "auto";
|
let overscrollBehavior = preventOverscroll ? "none" : "auto";
|
||||||
document.body.style.overscrollBehavior = overscrollBehavior;
|
document.body.style.overscrollBehavior = overscrollBehavior;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidUpdate() {
|
componentDidUpdate() {
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
super.componentWillUnmount();
|
super.componentWillUnmount();
|
||||||
this.model_.errorMessage.removeOnChangedHandler(this.errorChangeHandler_);
|
window.removeEventListener("beforeunload",this.unmountListener);
|
||||||
this.model_.state.removeOnChangedHandler(this.stateChangeHandler_);
|
|
||||||
this.model_.pedalboard.removeOnChangedHandler(this.presetChangedHandler);
|
|
||||||
this.model_.banks.removeOnChangedHandler(this.banksChangedHandler);
|
|
||||||
this.model_.banks.removeOnChangedHandler(this.showStatusMonitorHandler);
|
|
||||||
|
|
||||||
}
|
this.model_.errorMessage.removeOnChangedHandler(this.errorChangeHandler_);
|
||||||
|
this.model_.state.removeOnChangedHandler(this.stateChangeHandler_);
|
||||||
|
this.model_.pedalboard.removeOnChangedHandler(this.presetChangedHandler);
|
||||||
|
this.model_.banks.removeOnChangedHandler(this.banksChangedHandler);
|
||||||
|
this.model_.banks.removeOnChangedHandler(this.showStatusMonitorHandler);
|
||||||
|
|
||||||
alertMessageChangedHandler() {
|
}
|
||||||
let message = this.model_.alertMessage.get();
|
|
||||||
if (message === "") {
|
|
||||||
this.setState({ alertDialogOpen: false });
|
|
||||||
// leave the message intact so the dialog can fade.
|
|
||||||
} else {
|
|
||||||
this.setState({
|
|
||||||
alertDialogOpen: true,
|
|
||||||
alertDialogMessage: message
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
updateResponsive() {
|
|
||||||
// functional, but disabled.
|
|
||||||
// let tinyToolBar_ = this.windowSize.height < 600;
|
|
||||||
// this.setState({ tinyToolBar: tinyToolBar_ });
|
|
||||||
|
|
||||||
let height = this.windowSize.height;
|
|
||||||
|
|
||||||
const ENTRY_HEIGHT = 48;
|
|
||||||
// ENTRY_HEIGHT*6 +K = 727 from observation.
|
|
||||||
const K = 450;
|
|
||||||
|
|
||||||
let bankEntries = Math.floor((height - K) / ENTRY_HEIGHT);
|
|
||||||
if (bankEntries < 1) bankEntries = 1;
|
|
||||||
if (bankEntries > 7) bankEntries = 7;
|
|
||||||
this.setState({ bankDisplayItems: bankEntries });
|
|
||||||
|
|
||||||
}
|
|
||||||
onWindowSizeChanged(width: number, height: number): void {
|
|
||||||
super.onWindowSizeChanged(width, height);
|
|
||||||
this.updateResponsive();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
setErrorMessage(message: string): void {
|
|
||||||
this.setState({ errorMessage: message });
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
setDisplayState(newState: State): void {
|
|
||||||
this.updateOverscroll();
|
|
||||||
|
|
||||||
|
alertMessageChangedHandler() {
|
||||||
|
let message = this.model_.alertMessage.get();
|
||||||
|
if (message === "") {
|
||||||
|
this.setState({ alertDialogOpen: false });
|
||||||
|
// leave the message intact so the dialog can fade.
|
||||||
|
} else {
|
||||||
this.setState({
|
this.setState({
|
||||||
displayState: newState,
|
alertDialogOpen: true,
|
||||||
canFullScreen: supportsFullScreen() && !this.model_.isAndroidHosted()
|
alertDialogMessage: message
|
||||||
});
|
});
|
||||||
if (newState === State.Ready)
|
|
||||||
{
|
|
||||||
if (this.model_.isOnboarding())
|
|
||||||
{
|
|
||||||
this.handleDisplayOnboarding();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
showDrawer() {
|
}
|
||||||
this.setState({ isDrawerOpen: true })
|
updateResponsive() {
|
||||||
}
|
// functional, but disabled.
|
||||||
hideDrawer() {
|
// let tinyToolBar_ = this.windowSize.height < 600;
|
||||||
this.setState({ isDrawerOpen: false })
|
// this.setState({ tinyToolBar: tinyToolBar_ });
|
||||||
}
|
|
||||||
shortBankList(banks: BankIndex): BankIndexEntry[] {
|
|
||||||
let n = this.state.bankDisplayItems;
|
|
||||||
let entries = banks.entries;
|
|
||||||
if (entries.length < n + 1) { // +1 for the .... entry.
|
|
||||||
return entries;
|
|
||||||
}
|
|
||||||
let result: BankIndexEntry[] = [];
|
|
||||||
let selectedIndex = -1;
|
|
||||||
for (let i = 0; i < entries.length; ++i) {
|
|
||||||
if (entries[i].instanceId === banks.selectedBank) {
|
|
||||||
selectedIndex = i;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (n > entries.length) n = entries.length;
|
|
||||||
if (selectedIndex > n) {
|
|
||||||
for (let i = 0; i < n - 1; ++i) {
|
|
||||||
result.push(entries[i]);
|
|
||||||
}
|
|
||||||
result.push(entries[selectedIndex]);
|
|
||||||
} else {
|
|
||||||
for (let i = 0; i < n; ++i) {
|
|
||||||
result.push(entries[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
handleReload() {
|
|
||||||
if (this.model_.isAndroidHosted()) {
|
|
||||||
this.model_.chooseNewDevice();
|
|
||||||
} else {
|
|
||||||
window.location.reload();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
render() {
|
|
||||||
|
|
||||||
const { classes } = this.props;
|
let height = this.windowSize.height;
|
||||||
|
|
||||||
let shortBankList = this.shortBankList(this.state.banks);
|
const ENTRY_HEIGHT = 48;
|
||||||
let showBankSelectDialog = shortBankList.length !== this.state.banks.entries.length;
|
// ENTRY_HEIGHT*6 +K = 727 from observation.
|
||||||
|
const K = 450;
|
||||||
|
|
||||||
|
let bankEntries = Math.floor((height - K) / ENTRY_HEIGHT);
|
||||||
|
if (bankEntries < 1) bankEntries = 1;
|
||||||
|
if (bankEntries > 7) bankEntries = 7;
|
||||||
|
this.setState({ bankDisplayItems: bankEntries });
|
||||||
|
|
||||||
|
}
|
||||||
|
onWindowSizeChanged(width: number, height: number): void {
|
||||||
|
super.onWindowSizeChanged(width, height);
|
||||||
|
this.updateResponsive();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return (
|
setErrorMessage(message: string): void {
|
||||||
<div style={{
|
this.setState({ errorMessage: message });
|
||||||
minHeight: 345, minWidth: 390,
|
}
|
||||||
position: "absolute", width: "100%", height: "100%", background: "#F88", userSelect: "none",
|
|
||||||
display: "flex", flexDirection: "column", flexWrap: "nowrap",
|
|
||||||
overscrollBehavior: this.state.isDebug ? "auto" : "none"
|
setDisplayState(newState: State): void {
|
||||||
|
this.updateOverscroll();
|
||||||
|
|
||||||
|
this.setState({
|
||||||
|
displayState: newState,
|
||||||
|
canFullScreen: supportsFullScreen() && !this.model_.isAndroidHosted()
|
||||||
|
});
|
||||||
|
if(newState === State.Ready)
|
||||||
|
{
|
||||||
|
if (this.model_.isOnboarding()) {
|
||||||
|
this.handleDisplayOnboarding();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
showDrawer() {
|
||||||
|
this.setState({ isDrawerOpen: true })
|
||||||
|
}
|
||||||
|
hideDrawer() {
|
||||||
|
this.setState({ isDrawerOpen: false })
|
||||||
|
}
|
||||||
|
shortBankList(banks: BankIndex): BankIndexEntry[] {
|
||||||
|
let n = this.state.bankDisplayItems;
|
||||||
|
let entries = banks.entries;
|
||||||
|
if (entries.length < n + 1) { // +1 for the .... entry.
|
||||||
|
return entries;
|
||||||
|
}
|
||||||
|
let result: BankIndexEntry[] = [];
|
||||||
|
let selectedIndex = -1;
|
||||||
|
for (let i = 0; i < entries.length; ++i) {
|
||||||
|
if (entries[i].instanceId === banks.selectedBank) {
|
||||||
|
selectedIndex = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (n > entries.length) n = entries.length;
|
||||||
|
if (selectedIndex > n) {
|
||||||
|
for (let i = 0; i < n - 1; ++i) {
|
||||||
|
result.push(entries[i]);
|
||||||
|
}
|
||||||
|
result.push(entries[selectedIndex]);
|
||||||
|
} else {
|
||||||
|
for (let i = 0; i < n; ++i) {
|
||||||
|
result.push(entries[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
handleReload() {
|
||||||
|
if (this.model_.isAndroidHosted()) {
|
||||||
|
this.model_.chooseNewDevice();
|
||||||
|
} else {
|
||||||
|
window.location.reload();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
render() {
|
||||||
|
|
||||||
|
const { classes } = this.props;
|
||||||
|
|
||||||
|
let shortBankList = this.shortBankList(this.state.banks);
|
||||||
|
let showBankSelectDialog = shortBankList.length !== this.state.banks.entries.length;
|
||||||
|
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div style={{
|
||||||
|
minHeight: 345, minWidth: 390,
|
||||||
|
position: "absolute", width: "100%", height: "100%", background: "#F88", userSelect: "none",
|
||||||
|
display: "flex", flexDirection: "column", flexWrap: "nowrap",
|
||||||
|
overscrollBehavior: this.state.isDebug ? "auto" : "none"
|
||||||
|
}}
|
||||||
|
onContextMenu={(e) => {
|
||||||
|
if (!this.model_.debug) {
|
||||||
|
e.preventDefault(); e.stopPropagation();
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
onContextMenu={(e) => {
|
>
|
||||||
if (!this.model_.debug) {
|
<CssBaseline />
|
||||||
e.preventDefault(); e.stopPropagation();
|
{(!this.state.tinyToolBar) ?
|
||||||
}
|
(
|
||||||
}}
|
<AppBar position="absolute" style={{ background: "white" }}>
|
||||||
>
|
<Toolbar variant="dense" >
|
||||||
<CssBaseline />
|
|
||||||
{(!this.state.tinyToolBar) ?
|
|
||||||
(
|
|
||||||
<AppBar position="absolute" style={{ background: "white" }}>
|
|
||||||
<Toolbar variant="dense" >
|
|
||||||
<IconButton
|
|
||||||
edge="start"
|
|
||||||
aria-label="menu"
|
|
||||||
onClick={() => { this.showDrawer() }}
|
|
||||||
size="large">
|
|
||||||
<MenuButton />
|
|
||||||
</IconButton>
|
|
||||||
<div style={{ flex: "0 1 400px", minWidth: 100 }}>
|
|
||||||
<PresetSelector />
|
|
||||||
</div>
|
|
||||||
<div style={{ flex: "2 2 30px" }} />
|
|
||||||
{this.state.canFullScreen &&
|
|
||||||
<IconButton
|
|
||||||
aria-label="menu"
|
|
||||||
onClick={() => { this.toggleFullScreen(); }}
|
|
||||||
size="large">
|
|
||||||
{this.state.isFullScreen ? (
|
|
||||||
<FullscreenExitIcon />
|
|
||||||
) : (
|
|
||||||
<FullscreenIcon />
|
|
||||||
|
|
||||||
)}
|
|
||||||
|
|
||||||
</IconButton>
|
|
||||||
}
|
|
||||||
</Toolbar>
|
|
||||||
</AppBar>
|
|
||||||
) : (
|
|
||||||
<div className={classes.toolBarContent} >
|
|
||||||
<IconButton
|
<IconButton
|
||||||
style={{ position: "absolute", left: 12, top: 8, zIndex: 2 }}
|
edge="start"
|
||||||
aria-label="menu"
|
aria-label="menu"
|
||||||
onClick={() => { this.showDrawer() }}
|
onClick={() => { this.showDrawer() }}
|
||||||
size="large">
|
size="large">
|
||||||
<MenuButton />
|
<MenuButton />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
{this.state.canFullScreen && (
|
<div style={{ flex: "0 1 400px", minWidth: 100 }}>
|
||||||
|
<PresetSelector />
|
||||||
|
</div>
|
||||||
|
<div style={{ flex: "2 2 30px" }} />
|
||||||
|
{this.state.canFullScreen &&
|
||||||
<IconButton
|
<IconButton
|
||||||
style={{ position: "absolute", right: 8, top: 8, zIndex: 2 }}
|
|
||||||
aria-label="menu"
|
aria-label="menu"
|
||||||
onClick={() => { this.toggleFullScreen(); }}
|
onClick={() => { this.toggleFullScreen(); }}
|
||||||
size="large">
|
size="large">
|
||||||
@@ -708,208 +683,234 @@ const AppThemed = withStyles(appStyles)(class extends ResizeResponsiveComponent<
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
</IconButton>
|
</IconButton>
|
||||||
)}
|
}
|
||||||
</div>
|
</Toolbar>
|
||||||
)}
|
</AppBar>
|
||||||
<TemporaryDrawer position='left' title="PiPedal"
|
) : (
|
||||||
is_open={this.state.isDrawerOpen} onClose={() => { this.hideDrawer(); }} >
|
<div className={classes.toolBarContent} >
|
||||||
<List subheader={
|
<IconButton
|
||||||
<ListSubheader component="div" id="nested-list-subheader">Banks</ListSubheader>
|
style={{ position: "absolute", left: 12, top: 8, zIndex: 2 }}
|
||||||
}>
|
aria-label="menu"
|
||||||
{
|
onClick={() => { this.showDrawer() }}
|
||||||
shortBankList.map((bank) => {
|
size="large">
|
||||||
return (
|
<MenuButton />
|
||||||
<ListItem button key={'bank' + bank.instanceId} selected={bank.instanceId === this.state.banks.selectedBank}
|
</IconButton>
|
||||||
onClick={() => this.onOpenBank(bank.instanceId)}
|
{this.state.canFullScreen && (
|
||||||
>
|
<IconButton
|
||||||
|
style={{ position: "absolute", right: 8, top: 8, zIndex: 2 }}
|
||||||
|
aria-label="menu"
|
||||||
|
onClick={() => { this.toggleFullScreen(); }}
|
||||||
|
size="large">
|
||||||
|
{this.state.isFullScreen ? (
|
||||||
|
<FullscreenExitIcon />
|
||||||
|
) : (
|
||||||
|
<FullscreenIcon />
|
||||||
|
|
||||||
<ListItemText primary={bank.name} />
|
)}
|
||||||
</ListItem>
|
|
||||||
|
|
||||||
);
|
</IconButton>
|
||||||
})
|
)}
|
||||||
}
|
</div>
|
||||||
{
|
)}
|
||||||
showBankSelectDialog && (
|
<TemporaryDrawer position='left' title="PiPedal"
|
||||||
<ListItem button key={'bankDOTDOTDOT'} selected={false}
|
is_open={this.state.isDrawerOpen} onClose={() => { this.hideDrawer(); }} >
|
||||||
onClick={() => this.handleDrawerSelectBank()}
|
<List subheader={
|
||||||
|
<ListSubheader component="div" id="nested-list-subheader">Banks</ListSubheader>
|
||||||
|
}>
|
||||||
|
{
|
||||||
|
shortBankList.map((bank) => {
|
||||||
|
return (
|
||||||
|
<ListItem button key={'bank' + bank.instanceId} selected={bank.instanceId === this.state.banks.selectedBank}
|
||||||
|
onClick={() => this.onOpenBank(bank.instanceId)}
|
||||||
>
|
>
|
||||||
|
|
||||||
<ListItemText primary={"..."} />
|
<ListItemText primary={bank.name} />
|
||||||
</ListItem>
|
</ListItem>
|
||||||
|
|
||||||
|
);
|
||||||
)
|
|
||||||
}
|
|
||||||
</List>
|
|
||||||
<Divider />
|
|
||||||
<List>
|
|
||||||
<ListItem button key='RenameBank' onClick={() => { this.handleDrawerRenameBank() }}>
|
|
||||||
<ListItemIcon><img src="img/drive_file_rename_outline_black_24dp.svg" alt="" style={{ opacity: 0.6 }} /></ListItemIcon>
|
|
||||||
<ListItemText primary='Rename Bank' />
|
|
||||||
</ListItem>
|
|
||||||
<ListItem button key='SaveBank' onClick={() => { this.handleDrawerSaveBankAs() }} >
|
|
||||||
<ListItemIcon>
|
|
||||||
<img src="img/save_bank_as.svg" alt="" style={{ opacity: 0.6 }} />
|
|
||||||
</ListItemIcon>
|
|
||||||
<ListItemText primary='Save As New Bank' />
|
|
||||||
</ListItem>
|
|
||||||
<ListItem button key='CreateBank' onClick={() => { this.handleDrawerManageBanks(); }}>
|
|
||||||
<ListItemIcon>
|
|
||||||
<img src="img/edit_banks.svg" alt="" style={{ opacity: 0.6 }} />
|
|
||||||
</ListItemIcon>
|
|
||||||
<ListItemText primary='Manage Banks...' />
|
|
||||||
</ListItem>
|
|
||||||
</List>
|
|
||||||
<Divider />
|
|
||||||
<List>
|
|
||||||
<ListItem button key='Settings' onClick={() => { this.handleDrawerSettingsClick() }}>
|
|
||||||
<ListItemIcon>
|
|
||||||
<img src="img/settings_black_24dp.svg" alt="" style={{ opacity: 0.6 }} />
|
|
||||||
</ListItemIcon>
|
|
||||||
<ListItemText primary='Settings' />
|
|
||||||
</ListItem>
|
|
||||||
<ListItem button key='About' onClick={() => { this.handleDrawerAboutClick() }}>
|
|
||||||
<ListItemIcon>
|
|
||||||
<img src="img/help_outline_black_24dp.svg" alt="" style={{ opacity: 0.6 }} />
|
|
||||||
</ListItemIcon>
|
|
||||||
<ListItemText primary='About' />
|
|
||||||
</ListItem>
|
|
||||||
<ListItem button key='Donations' onClick={() => { this.handleDrawerDonationClick() }}>
|
|
||||||
<ListItemIcon>
|
|
||||||
<VolunteerActivismIcon />
|
|
||||||
</ListItemIcon>
|
|
||||||
<ListItemText primary='Donations' />
|
|
||||||
</ListItem>
|
|
||||||
</List>
|
|
||||||
|
|
||||||
</TemporaryDrawer>
|
|
||||||
{!this.state.tinyToolBar && (
|
|
||||||
<Toolbar className={classes.toolBarSpacer} variant="dense" />
|
|
||||||
)}
|
|
||||||
<main className={classes.mainFrame} >
|
|
||||||
<div className={classes.mainSizingPosition}>
|
|
||||||
<div className={classes.heroContent}>
|
|
||||||
{(this.state.displayState !== State.Loading) && (
|
|
||||||
<MainPage hasTinyToolBar={this.state.tinyToolBar} />
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</main>
|
|
||||||
<BankDialog show={this.state.bankDialogOpen} isEditDialog={this.state.editBankDialogOpen} onDialogClose={() => this.setState({ bankDialogOpen: false })} />
|
|
||||||
<AboutDialog open={this.state.aboutDialogOpen} onClose={() => this.setState({ aboutDialogOpen: false })} />
|
|
||||||
<SettingsDialog
|
|
||||||
open={this.state.isSettingsDialogOpen}
|
|
||||||
onboarding={this.state.onboarding}
|
|
||||||
onClose={() => this.handleSettingsDialogClose()} />
|
|
||||||
<RenameDialog
|
|
||||||
open={this.state.renameBankDialogOpen || this.state.saveBankAsDialogOpen}
|
|
||||||
defaultName={this.model_.banks.get().getSelectedEntryName()}
|
|
||||||
acceptActionName={"Rename"}
|
|
||||||
onClose={() => {
|
|
||||||
this.setState({
|
|
||||||
renameBankDialogOpen: false,
|
|
||||||
saveBankAsDialogOpen: false
|
|
||||||
})
|
})
|
||||||
}}
|
|
||||||
onOk={(text: string) => {
|
|
||||||
if (this.state.renameBankDialogOpen) {
|
|
||||||
this.handleBankRenameOk(text);
|
|
||||||
} else if (this.state.saveBankAsDialogOpen) {
|
|
||||||
this.handleSaveBankAsOk(text);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
{
|
||||||
/>
|
showBankSelectDialog && (
|
||||||
|
<ListItem button key={'bankDOTDOTDOT'} selected={false}
|
||||||
|
onClick={() => this.handleDrawerSelectBank()}
|
||||||
|
>
|
||||||
|
|
||||||
<ZoomedUiControl
|
<ListItemText primary={"..."} />
|
||||||
dialogOpen={this.state.zoomedControlOpen}
|
</ListItem>
|
||||||
controlInfo={this.state.zoomedControlInfo}
|
|
||||||
onDialogClose={() => { this.setState({ zoomedControlOpen: false }); }}
|
|
||||||
onDialogClosed={() => { this.model_.zoomedUiControl.set(undefined); }
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
<Dialog
|
|
||||||
open={this.state.alertDialogOpen}
|
|
||||||
onClose={this.handleCloseAlert}
|
|
||||||
aria-describedby="alert-dialog-description"
|
|
||||||
>
|
|
||||||
<DialogContent>
|
|
||||||
<DialogContentText id="alert-dialog-description">
|
|
||||||
<Typography variant="body2">
|
|
||||||
{
|
|
||||||
this.state.alertDialogMessage
|
|
||||||
}
|
|
||||||
</Typography>
|
|
||||||
</DialogContentText>
|
|
||||||
</DialogContent>
|
|
||||||
<DialogActions>
|
|
||||||
<Button onClick={this.handleCloseAlert} color="primary" autoFocus>
|
|
||||||
OK
|
|
||||||
</Button>
|
|
||||||
</DialogActions>
|
|
||||||
</Dialog>
|
|
||||||
{ this.state.showStatusMonitor && (<JackStatusView />) }
|
|
||||||
|
|
||||||
<div className={classes.errorContent} style={{
|
|
||||||
display: (this.state.displayState === State.Reconnecting || this.state.displayState === State.ApplyingChanges)
|
)
|
||||||
? "block" : "none"
|
}
|
||||||
|
</List>
|
||||||
|
<Divider />
|
||||||
|
<List>
|
||||||
|
<ListItem button key='RenameBank' onClick={() => { this.handleDrawerRenameBank() }}>
|
||||||
|
<ListItemIcon><img src="img/drive_file_rename_outline_black_24dp.svg" alt="" style={{ opacity: 0.6 }} /></ListItemIcon>
|
||||||
|
<ListItemText primary='Rename Bank' />
|
||||||
|
</ListItem>
|
||||||
|
<ListItem button key='SaveBank' onClick={() => { this.handleDrawerSaveBankAs() }} >
|
||||||
|
<ListItemIcon>
|
||||||
|
<img src="img/save_bank_as.svg" alt="" style={{ opacity: 0.6 }} />
|
||||||
|
</ListItemIcon>
|
||||||
|
<ListItemText primary='Save As New Bank' />
|
||||||
|
</ListItem>
|
||||||
|
<ListItem button key='CreateBank' onClick={() => { this.handleDrawerManageBanks(); }}>
|
||||||
|
<ListItemIcon>
|
||||||
|
<img src="img/edit_banks.svg" alt="" style={{ opacity: 0.6 }} />
|
||||||
|
</ListItemIcon>
|
||||||
|
<ListItemText primary='Manage Banks...' />
|
||||||
|
</ListItem>
|
||||||
|
</List>
|
||||||
|
<Divider />
|
||||||
|
<List>
|
||||||
|
<ListItem button key='Settings' onClick={() => { this.handleDrawerSettingsClick() }}>
|
||||||
|
<ListItemIcon>
|
||||||
|
<img src="img/settings_black_24dp.svg" alt="" style={{ opacity: 0.6 }} />
|
||||||
|
</ListItemIcon>
|
||||||
|
<ListItemText primary='Settings' />
|
||||||
|
</ListItem>
|
||||||
|
<ListItem button key='About' onClick={() => { this.handleDrawerAboutClick() }}>
|
||||||
|
<ListItemIcon>
|
||||||
|
<img src="img/help_outline_black_24dp.svg" alt="" style={{ opacity: 0.6 }} />
|
||||||
|
</ListItemIcon>
|
||||||
|
<ListItemText primary='About' />
|
||||||
|
</ListItem>
|
||||||
|
<ListItem button key='Donations' onClick={() => { this.handleDrawerDonationClick() }}>
|
||||||
|
<ListItemIcon>
|
||||||
|
<VolunteerActivismIcon />
|
||||||
|
</ListItemIcon>
|
||||||
|
<ListItemText primary='Donations' />
|
||||||
|
</ListItem>
|
||||||
|
</List>
|
||||||
|
|
||||||
|
</TemporaryDrawer>
|
||||||
|
{!this.state.tinyToolBar && (
|
||||||
|
<Toolbar className={classes.toolBarSpacer} variant="dense" />
|
||||||
|
)}
|
||||||
|
<main className={classes.mainFrame} >
|
||||||
|
<div className={classes.mainSizingPosition}>
|
||||||
|
<div className={classes.heroContent}>
|
||||||
|
{(this.state.displayState !== State.Loading) && (
|
||||||
|
<MainPage hasTinyToolBar={this.state.tinyToolBar} />
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
<BankDialog show={this.state.bankDialogOpen} isEditDialog={this.state.editBankDialogOpen} onDialogClose={() => this.setState({ bankDialogOpen: false })} />
|
||||||
|
<AboutDialog open={this.state.aboutDialogOpen} onClose={() => this.setState({ aboutDialogOpen: false })} />
|
||||||
|
<SettingsDialog
|
||||||
|
open={this.state.isSettingsDialogOpen}
|
||||||
|
onboarding={this.state.onboarding}
|
||||||
|
onClose={() => this.handleSettingsDialogClose()} />
|
||||||
|
<RenameDialog
|
||||||
|
open={this.state.renameBankDialogOpen || this.state.saveBankAsDialogOpen}
|
||||||
|
defaultName={this.model_.banks.get().getSelectedEntryName()}
|
||||||
|
acceptActionName={"Rename"}
|
||||||
|
onClose={() => {
|
||||||
|
this.setState({
|
||||||
|
renameBankDialogOpen: false,
|
||||||
|
saveBankAsDialogOpen: false
|
||||||
|
})
|
||||||
}}
|
}}
|
||||||
>
|
onOk={(text: string) => {
|
||||||
<div className={classes.errorContentMask} />
|
if (this.state.renameBankDialogOpen) {
|
||||||
|
this.handleBankRenameOk(text);
|
||||||
|
} else if (this.state.saveBankAsDialogOpen) {
|
||||||
|
this.handleSaveBankAsOk(text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
<div className={classes.loadingBox}>
|
<ZoomedUiControl
|
||||||
<div className={classes.loadingBoxItem}>
|
dialogOpen={this.state.zoomedControlOpen}
|
||||||
<CircularProgress color="inherit" className={classes.loadingBoxItem} />
|
controlInfo={this.state.zoomedControlInfo}
|
||||||
</div>
|
onDialogClose={() => { this.setState({ zoomedControlOpen: false }); }}
|
||||||
<Typography noWrap variant="body2" className={classes.progressText}>
|
onDialogClosed={() => { this.model_.zoomedUiControl.set(undefined); }
|
||||||
{this.state.displayState === State.ApplyingChanges ? "Applying\u00A0changes..." : "Reconnecting..."}
|
}
|
||||||
|
/>
|
||||||
|
<Dialog
|
||||||
|
open={this.state.alertDialogOpen}
|
||||||
|
onClose={this.handleCloseAlert}
|
||||||
|
aria-describedby="alert-dialog-description"
|
||||||
|
>
|
||||||
|
<DialogContent>
|
||||||
|
<DialogContentText id="alert-dialog-description">
|
||||||
|
<Typography variant="body2">
|
||||||
|
{
|
||||||
|
this.state.alertDialogMessage
|
||||||
|
}
|
||||||
</Typography>
|
</Typography>
|
||||||
</div>
|
</DialogContentText>
|
||||||
</div>
|
</DialogContent>
|
||||||
<div className={classes.errorContent} style={{ display: this.state.displayState === State.Error ? "flex" : "none" }}
|
<DialogActions>
|
||||||
onMouseDown={preventDefault} onKeyDown={preventDefault}
|
<Button onClick={this.handleCloseAlert} color="primary" autoFocus>
|
||||||
>
|
OK
|
||||||
<div className={classes.errorContentMask} />
|
</Button>
|
||||||
<div style={{ flex: "2 2 3px", height: 20 }} > </div>
|
</DialogActions>
|
||||||
<div className={classes.errorMessageBox} style={{ position: "relative" }} >
|
</Dialog>
|
||||||
<div style={{ fontSize: "30px", position: "absolute", left: 0, top: 3, color: "#A00" }}>
|
{this.state.showStatusMonitor && (<JackStatusView />)}
|
||||||
<ErrorOutlineIcon color="inherit" fontSize="inherit" style={{ float: "left", marginRight: "12px" }} />
|
|
||||||
</div>
|
|
||||||
<div style={{ marginLeft: 40, marginTop: 3 }}>
|
|
||||||
<p className={classes.errorText}>
|
|
||||||
Error: {this.state.errorMessage}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div style={{ paddingTop: 50, paddingLeft: 36, textAlign: "left" }}>
|
|
||||||
<Button variant='contained' color="primary" component='button'
|
|
||||||
onClick={() => this.handleReload()} >
|
|
||||||
Reload
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
</div>
|
<div className={classes.errorContent} style={{
|
||||||
|
display: (this.state.displayState === State.Reconnecting || this.state.displayState === State.ApplyingChanges)
|
||||||
|
? "block" : "none"
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div className={classes.errorContentMask} />
|
||||||
|
|
||||||
|
<div className={classes.loadingBox}>
|
||||||
|
<div className={classes.loadingBoxItem}>
|
||||||
|
<CircularProgress color="inherit" className={classes.loadingBoxItem} />
|
||||||
|
</div>
|
||||||
|
<Typography noWrap variant="body2" className={classes.progressText}>
|
||||||
|
{this.state.displayState === State.ApplyingChanges ? "Applying\u00A0changes..." : "Reconnecting..."}
|
||||||
|
</Typography>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className={classes.errorContent} style={{ display: this.state.displayState === State.Error ? "flex" : "none" }}
|
||||||
|
onMouseDown={preventDefault} onKeyDown={preventDefault}
|
||||||
|
>
|
||||||
|
<div className={classes.errorContentMask} />
|
||||||
|
<div style={{ flex: "2 2 3px", height: 20 }} > </div>
|
||||||
|
<div className={classes.errorMessageBox} style={{ position: "relative" }} >
|
||||||
|
<div style={{ fontSize: "30px", position: "absolute", left: 0, top: 3, color: "#A00" }}>
|
||||||
|
<ErrorOutlineIcon color="inherit" fontSize="inherit" style={{ float: "left", marginRight: "12px" }} />
|
||||||
|
</div>
|
||||||
|
<div style={{ marginLeft: 40, marginTop: 3 }}>
|
||||||
|
<p className={classes.errorText}>
|
||||||
|
Error: {this.state.errorMessage}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div style={{ paddingTop: 50, paddingLeft: 36, textAlign: "left" }}>
|
||||||
|
<Button variant='contained' color="primary" component='button'
|
||||||
|
onClick={() => this.handleReload()} >
|
||||||
|
Reload
|
||||||
|
</Button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style={{ flex: "5 5 auto", height: 20 }} > </div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div className={classes.errorContent} style={{ display: this.state.displayState === State.Loading ? "block" : "none" }}>
|
|
||||||
<div className={classes.errorContentMask} />
|
<div style={{ flex: "5 5 auto", height: 20 }} > </div>
|
||||||
<div className={classes.loadingBox}>
|
|
||||||
<div className={classes.loadingBoxItem}>
|
</div>
|
||||||
<CircularProgress color="inherit" className={classes.loadingBoxItem} />
|
<div className={classes.errorContent} style={{ display: this.state.displayState === State.Loading ? "block" : "none" }}>
|
||||||
</div>
|
<div className={classes.errorContentMask} />
|
||||||
<Typography noWrap variant="body2" className={classes.loadingBoxItem}>
|
<div className={classes.loadingBox}>
|
||||||
Loading...
|
<div className={classes.loadingBoxItem}>
|
||||||
</Typography>
|
<CircularProgress color="inherit" className={classes.loadingBoxItem} />
|
||||||
</div>
|
</div>
|
||||||
|
<Typography noWrap variant="body2" className={classes.loadingBoxItem}>
|
||||||
|
Loading...
|
||||||
|
</Typography>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div >
|
</div >
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ export class UiFileType {
|
|||||||
} else {
|
} else {
|
||||||
// chrome desktop thinks "application/octet-stream" is .exe, .com, or .bat.
|
// chrome desktop thinks "application/octet-stream" is .exe, .com, or .bat.
|
||||||
// Feed it file extensions isntead.
|
// Feed it file extensions isntead.
|
||||||
if (result = "application/octet-stream")
|
if (result === "application/octet-stream")
|
||||||
{
|
{
|
||||||
result = "";
|
result = "";
|
||||||
for (let i = 0; i < fileTypes.length; ++i)
|
for (let i = 0; i < fileTypes.length; ++i)
|
||||||
|
|||||||
@@ -957,8 +957,8 @@ export class PiPedalModel //implements PiPedalModel
|
|||||||
|
|
||||||
}
|
}
|
||||||
enterBackgroundState() {
|
enterBackgroundState() {
|
||||||
// on Android, delay entering background state by 3 seconds,
|
// on Android, delay entering background state by 180 seconds,
|
||||||
// so that screen-flips don't trigger disconnects.
|
// since background management is more complicated. e.g. screen flips, and system upload dialogs.
|
||||||
|
|
||||||
if (this.isAndroidHosted()) {
|
if (this.isAndroidHosted()) {
|
||||||
if (this.backgroundStateTimeout) {
|
if (this.backgroundStateTimeout) {
|
||||||
@@ -967,7 +967,7 @@ export class PiPedalModel //implements PiPedalModel
|
|||||||
this.backgroundStateTimeout = setTimeout(() => {
|
this.backgroundStateTimeout = setTimeout(() => {
|
||||||
this.backgroundStateTimeout = undefined;
|
this.backgroundStateTimeout = undefined;
|
||||||
this.enterBackgroundState_();
|
this.enterBackgroundState_();
|
||||||
}, 3000);
|
}, 180000);
|
||||||
} else {
|
} else {
|
||||||
this.enterBackgroundState_();
|
this.enterBackgroundState_();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,26 +71,6 @@ namespace pipedal
|
|||||||
|
|
||||||
static const char *LV2_MIDI_PLUGIN = "http://lv2plug.in/ns/lv2core#MIDIPlugin";
|
static const char *LV2_MIDI_PLUGIN = "http://lv2plug.in/ns/lv2core#MIDIPlugin";
|
||||||
|
|
||||||
// static const char *LV2_AUDIO_PORT = P_LV2_CORE_URI "AudioPort";
|
|
||||||
// static const char *LV2_PLUGIN = P_LV2_CORE_URI "Plugin";
|
|
||||||
// static const char *LV2_CONTROL_PORT = P_LV2_CORE_URI "ControlPort";
|
|
||||||
// static const char *LV2_INPUT_PORT = P_LV2_CORE_URI "InputPort";
|
|
||||||
// static const char *LV2_OUTPUT_PORT = P_LV2_CORE_URI "OutputPort";
|
|
||||||
// static const char *LV2_INTEGER = P_LV2_CORE_URI "integer";
|
|
||||||
// static const char *LV2_ENUMERATION = P_LV2_CORE_URI "enumeration";
|
|
||||||
// static const char *LV2_PORT_LOGARITHMIC = P_LV2_PPROPS "logarithmic";
|
|
||||||
// static const char *LV2_PORT_RANGE_STEPS = P_LV2_PPROPS "rangeSteps";
|
|
||||||
// static const char *LV2_PORT_TRIGGER = P_LV2_PPROPS "trigger";
|
|
||||||
// static const char *LV2_PORT_DISPLAY_PRIORITY = P_LV2_PPROPS "displayPriority";
|
|
||||||
|
|
||||||
|
|
||||||
// static const char *LV2_ATOM_PORT = "http://lv2plug.in/ns/ext/atom#AtomPort";
|
|
||||||
// static const char *LV2_ATOM_SEQUENCE = "http://lv2plug.in/ns/ext/atom#Sequence";
|
|
||||||
// static const char *LV2_ATOM_SOUND = "http://lv2plug.in/ns/ext/atom#Sound";
|
|
||||||
// static const char *LV2_ATOM_VECTOR = "http://lv2plug.in/ns/ext/atom#Vector";
|
|
||||||
// static const char *LV2_ATOM_STRING = "http://lv2plug.in/ns/ext/atom#String";
|
|
||||||
// static const char *LV2_MIDI_EVENT = "http://lv2plug.in/ns/ext/midi#MidiEvent";
|
|
||||||
// static const char *LV2_DESIGNATION = "http://lv2plug.in/ns/lv2core#Designation";
|
|
||||||
|
|
||||||
class PluginHost::Urids
|
class PluginHost::Urids
|
||||||
{
|
{
|
||||||
|
|||||||
+143
-148
@@ -28,7 +28,6 @@
|
|||||||
#include "SysExec.hpp"
|
#include "SysExec.hpp"
|
||||||
#include "WriteTemplateFile.hpp"
|
#include "WriteTemplateFile.hpp"
|
||||||
|
|
||||||
|
|
||||||
using namespace pipedal;
|
using namespace pipedal;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
@@ -42,23 +41,22 @@ using namespace std;
|
|||||||
|
|
||||||
#define SYSTEMCTL_BIN "/usr/bin/systemctl"
|
#define SYSTEMCTL_BIN "/usr/bin/systemctl"
|
||||||
|
|
||||||
|
|
||||||
static char DNSMASQ_APD_PATH[] = "/etc/dnsmasq.d/30-pipedal-apd.conf";
|
static char DNSMASQ_APD_PATH[] = "/etc/dnsmasq.d/30-pipedal-apd.conf";
|
||||||
|
|
||||||
static char DNSMASQ_P2P_SOURCE_PATH[] = "/etc/pipedal/config/templates/30-pipedal-p2p.conf";
|
static char DNSMASQ_P2P_SOURCE_PATH[] = "/etc/pipedal/config/templates/30-pipedal-p2p.conf";
|
||||||
|
|
||||||
static char DNSMASQ_P2P_PATH[] = "/etc/dnsmasq.d/30-pipedal-p2p.conf";
|
static char DNSMASQ_P2P_PATH[] = "/etc/dnsmasq.d/30-pipedal-p2p.conf";
|
||||||
|
|
||||||
|
static bool IsApdInstalled()
|
||||||
static bool IsApdInstalled() {
|
{
|
||||||
|
|
||||||
return std::filesystem::exists(DNSMASQ_APD_PATH);
|
return std::filesystem::exists(DNSMASQ_APD_PATH);
|
||||||
}
|
}
|
||||||
static bool IsP2pInstalled() {
|
static bool IsP2pInstalled()
|
||||||
|
{
|
||||||
return std::filesystem::exists(DNSMASQ_P2P_PATH);
|
return std::filesystem::exists(DNSMASQ_P2P_PATH);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void restoreApdDhcpdConfFile()
|
static void restoreApdDhcpdConfFile()
|
||||||
{
|
{
|
||||||
// remove the interface wlan0 section.
|
// remove the interface wlan0 section.
|
||||||
@@ -135,7 +133,6 @@ static void restoreP2pDhcpdConfFile()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void restoreApdDnsmasqConfFile()
|
static void restoreApdDnsmasqConfFile()
|
||||||
{
|
{
|
||||||
std::filesystem::path path(DNSMASQ_APD_PATH);
|
std::filesystem::path path(DNSMASQ_APD_PATH);
|
||||||
@@ -155,21 +152,20 @@ static void restoreP2pDnsmasqConfFile()
|
|||||||
|
|
||||||
static void UninstallHostApd()
|
static void UninstallHostApd()
|
||||||
{
|
{
|
||||||
if (IsApdInstalled())
|
if (IsApdInstalled())
|
||||||
{
|
{
|
||||||
sysExec(SYSTEMCTL_BIN " stop hostapd");
|
sysExec(SYSTEMCTL_BIN " stop hostapd");
|
||||||
sysExec(SYSTEMCTL_BIN " disable hostapd");
|
sysExec(SYSTEMCTL_BIN " disable hostapd");
|
||||||
sysExec(SYSTEMCTL_BIN " stop dnsmasq");
|
sysExec(SYSTEMCTL_BIN " stop dnsmasq");
|
||||||
sysExec(SYSTEMCTL_BIN " disable dnsmasq");
|
sysExec(SYSTEMCTL_BIN " disable dnsmasq");
|
||||||
|
|
||||||
restoreApdDhcpdConfFile();
|
restoreApdDhcpdConfFile();
|
||||||
restoreApdDnsmasqConfFile();
|
restoreApdDnsmasqConfFile();
|
||||||
|
|
||||||
sysExec(SYSTEMCTL_BIN " unmask wpa_supplicant"); // TODO: Do we need this now we have no_hook line.
|
|
||||||
sysExec(SYSTEMCTL_BIN " enable wpa_supplicant");
|
|
||||||
sysExec(SYSTEMCTL_BIN " start wpa_supplicant");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
sysExec(SYSTEMCTL_BIN " unmask wpa_supplicant"); // TODO: Do we need this now we have no_hook line.
|
||||||
|
sysExec(SYSTEMCTL_BIN " enable wpa_supplicant");
|
||||||
|
sysExec(SYSTEMCTL_BIN " start wpa_supplicant");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void UninstallP2p();
|
static void UninstallP2p();
|
||||||
@@ -327,29 +323,28 @@ void pipedal::SetWifiConfig(const WifiConfigSettings &settings)
|
|||||||
sysExec("rfkill unblock wlan");
|
sysExec("rfkill unblock wlan");
|
||||||
sysExec(SYSTEMCTL_BIN " daemon-reload");
|
sysExec(SYSTEMCTL_BIN " daemon-reload");
|
||||||
|
|
||||||
// sysExec(SYSTEMCTL_BIN " mask wpa_supplicant");
|
// sysExec(SYSTEMCTL_BIN " mask wpa_supplicant");
|
||||||
sysExec(SYSTEMCTL_BIN " stop wpa_supplicant");
|
sysExec(SYSTEMCTL_BIN " stop wpa_supplicant");
|
||||||
|
|
||||||
sysExec(SYSTEMCTL_BIN " unmask hostapd");
|
// sysExec(SYSTEMCTL_BIN " unmask hostapd");
|
||||||
if (sysExec(SYSTEMCTL_BIN " restart hostapd") != 0)
|
// if (sysExec(SYSTEMCTL_BIN " restart hostapd") != 0)
|
||||||
{
|
// {
|
||||||
throw PiPedalException("Unable to start the access point.");
|
// throw PiPedalException("Unable to start the access point.");
|
||||||
}
|
// }
|
||||||
if (sysExec("systemctl is-active --quiet hostapd") != 0)
|
// if (sysExec("systemctl is-active --quiet hostapd") != 0)
|
||||||
{
|
// {
|
||||||
throw PiPedalException("Unable to start the access point.");
|
// throw PiPedalException("Unable to start the access point.");
|
||||||
}
|
// }
|
||||||
sysExec(SYSTEMCTL_BIN " enable hostapd");
|
// sysExec(SYSTEMCTL_BIN " enable hostapd");
|
||||||
|
|
||||||
sysExec(SYSTEMCTL_BIN " stop wpa_supplicant");
|
sysExec(SYSTEMCTL_BIN " stop wpa_supplicant");
|
||||||
// sysExec(SYSTEMCTL_BIN " mask wpa_supplicant");
|
// sysExec(SYSTEMCTL_BIN " mask wpa_supplicant");
|
||||||
|
|
||||||
sysExec(SYSTEMCTL_BIN " restart dnsmasq");
|
sysExec(SYSTEMCTL_BIN " restart dnsmasq");
|
||||||
sysExec(SYSTEMCTL_BIN " enable dnsmasq");
|
sysExec(SYSTEMCTL_BIN " enable dnsmasq");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*********************************************************************************
|
/*********************************************************************************
|
||||||
|
|
||||||
p2p configuration:
|
p2p configuration:
|
||||||
@@ -359,9 +354,9 @@ dnsmaqsq.d/30-pipedal-p2p.conf:
|
|||||||
|
|
||||||
interface=p2p-wlan0-0
|
interface=p2p-wlan0-0
|
||||||
dhcp-range=p2p-wlan0,173.24.0.3,172.23.0.127,1h
|
dhcp-range=p2p-wlan0,173.24.0.3,172.23.0.127,1h
|
||||||
domain=local
|
domain=local
|
||||||
address=/pipedal.local/172.23.0.2
|
address=/pipedal.local/172.23.0.2
|
||||||
|
|
||||||
except-interface=eth0
|
except-interface=eth0
|
||||||
except-interface=wlan0
|
except-interface=wlan0
|
||||||
except-interface=lo
|
except-interface=lo
|
||||||
@@ -376,7 +371,6 @@ interface p2p-wlan0-0
|
|||||||
Watch resolv.conf to make sure we don't lose DNS servers.
|
Watch resolv.conf to make sure we don't lose DNS servers.
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
void UninstallP2p()
|
void UninstallP2p()
|
||||||
{
|
{
|
||||||
if (IsP2pInstalled())
|
if (IsP2pInstalled())
|
||||||
@@ -390,141 +384,143 @@ void UninstallP2p()
|
|||||||
restoreP2pDhcpdConfFile();
|
restoreP2pDhcpdConfFile();
|
||||||
restoreP2pDnsmasqConfFile();
|
restoreP2pDnsmasqConfFile();
|
||||||
|
|
||||||
|
|
||||||
sysExec(SYSTEMCTL_BIN " restart dhcpcd");
|
sysExec(SYSTEMCTL_BIN " restart dhcpcd");
|
||||||
|
|
||||||
WifiDirectConfigSettings wifiDirectConfigSettings;
|
WifiDirectConfigSettings wifiDirectConfigSettings;
|
||||||
wifiDirectConfigSettings.Load();
|
wifiDirectConfigSettings.Load();
|
||||||
wifiDirectConfigSettings.enable_ = false;
|
wifiDirectConfigSettings.enable_ = false;
|
||||||
wifiDirectConfigSettings.Save();
|
wifiDirectConfigSettings.Save();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void pipedal::SetWifiDirectConfig(const WifiDirectConfigSettings &settings)
|
void pipedal::SetWifiDirectConfig(const WifiDirectConfigSettings &settings)
|
||||||
{
|
{
|
||||||
|
|
||||||
char band;
|
try
|
||||||
if (!settings.enable_)
|
|
||||||
{
|
{
|
||||||
cout << "Disabling P2P" << endl;
|
char band;
|
||||||
UninstallP2p();
|
if (!settings.enable_)
|
||||||
|
|
||||||
ServiceConfiguration deviceIdFile;
|
|
||||||
deviceIdFile.Load();
|
|
||||||
deviceIdFile.deviceName = settings.hotspotName_;
|
|
||||||
deviceIdFile.Save();
|
|
||||||
|
|
||||||
|
|
||||||
// Announce new mDNS service with potentially new deviceName.
|
|
||||||
sysExec(SYSTEMCTL_BIN " restart pipedald");
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
|
|
||||||
settings.Save();
|
|
||||||
// ******************* device_uuid
|
|
||||||
|
|
||||||
ServiceConfiguration deviceIdFile;
|
|
||||||
deviceIdFile.Load();
|
|
||||||
deviceIdFile.deviceName = settings.hotspotName_;
|
|
||||||
deviceIdFile.Save();
|
|
||||||
|
|
||||||
// ******************** dsnmasq ******
|
|
||||||
|
|
||||||
std::filesystem::remove(DNSMASQ_P2P_PATH);
|
|
||||||
std::filesystem::copy_file(DNSMASQ_P2P_SOURCE_PATH, DNSMASQ_P2P_PATH);
|
|
||||||
|
|
||||||
// ****** dhcpd.conf ***/
|
|
||||||
std::filesystem::path dhcpcdConfig("/etc/dhcpcd.conf");
|
|
||||||
if (std::filesystem::exists(dhcpcdConfig))
|
|
||||||
{
|
{
|
||||||
SystemConfigFile dhcpcd(dhcpcdConfig);
|
cout << "Disabling P2P" << endl;
|
||||||
|
UninstallP2p();
|
||||||
|
|
||||||
// dhcpcd.conf:
|
ServiceConfiguration deviceIdFile;
|
||||||
// ======
|
deviceIdFile.Load();
|
||||||
// interface p2p-wlan0-0
|
deviceIdFile.deviceName = settings.hotspotName_;
|
||||||
// static ip_address=172.24.0.1/24
|
deviceIdFile.Save();
|
||||||
// domain_name_server=172.24.0.1
|
|
||||||
|
|
||||||
|
// Announce new mDNS service with potentially new deviceName.
|
||||||
|
sysExec(SYSTEMCTL_BIN " restart pipedald");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cout << "Enabling P2P" << endl;
|
||||||
|
|
||||||
int line = dhcpcd.GetLineThatStartsWith("hostname");
|
settings.Save();
|
||||||
std::string hostNameLine;
|
// ******************* device_uuid
|
||||||
if (false)
|
|
||||||
{
|
|
||||||
// hostNameLine = "hostname " + settings.mdnsName_;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
hostNameLine = "hostname"; // the default value.
|
|
||||||
}
|
|
||||||
if (line != -1)
|
|
||||||
{
|
|
||||||
dhcpcd.SetLineValue(line, hostNameLine);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
dhcpcd.AppendLine(hostNameLine);
|
|
||||||
}
|
|
||||||
|
|
||||||
// erase any existing interface for p2p-wlan0-0
|
ServiceConfiguration deviceIdFile;
|
||||||
line = dhcpcd.GetLineNumber("interface p2p-wlan0-0");
|
deviceIdFile.Load();
|
||||||
if (line != -1)
|
deviceIdFile.deviceName = settings.hotspotName_;
|
||||||
|
deviceIdFile.Save();
|
||||||
|
|
||||||
|
// ******************** dsnmasq ******
|
||||||
|
|
||||||
|
std::filesystem::remove(DNSMASQ_P2P_PATH);
|
||||||
|
std::filesystem::copy_file(DNSMASQ_P2P_SOURCE_PATH, DNSMASQ_P2P_PATH);
|
||||||
|
|
||||||
|
// ****** dhcpd.conf ***/
|
||||||
|
std::filesystem::path dhcpcdConfig("/etc/dhcpcd.conf");
|
||||||
|
if (std::filesystem::exists(dhcpcdConfig))
|
||||||
{
|
{
|
||||||
dhcpcd.EraseLine(line);
|
cout << "Updating /etc/dhcpcd.conf" << endl;
|
||||||
while (line < dhcpcd.GetLineCount())
|
SystemConfigFile dhcpcd(dhcpcdConfig);
|
||||||
|
|
||||||
|
// dhcpcd.conf:
|
||||||
|
// ======
|
||||||
|
// interface p2p-wlan0-0
|
||||||
|
// static ip_address=172.24.0.1/24
|
||||||
|
// domain_name_server=172.24.0.1
|
||||||
|
|
||||||
|
int line = dhcpcd.GetLineThatStartsWith("hostname");
|
||||||
|
std::string hostNameLine;
|
||||||
|
if (false)
|
||||||
{
|
{
|
||||||
const std::string &lineValue = dhcpcd.GetLineValue(line);
|
// hostNameLine = "hostname " + settings.mdnsName_;
|
||||||
if (lineValue.length() > 0 && (lineValue[0] == ' ' || lineValue[0] == '\t'))
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
hostNameLine = "hostname"; // the default value.
|
||||||
|
}
|
||||||
|
if (line != -1)
|
||||||
|
{
|
||||||
|
dhcpcd.SetLineValue(line, hostNameLine);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dhcpcd.AppendLine(hostNameLine);
|
||||||
|
}
|
||||||
|
|
||||||
|
// erase any existing interface for p2p-wlan0-0
|
||||||
|
line = dhcpcd.GetLineNumber("interface p2p-wlan0-0");
|
||||||
|
if (line != -1)
|
||||||
|
{
|
||||||
|
dhcpcd.EraseLine(line);
|
||||||
|
while (line < dhcpcd.GetLineCount())
|
||||||
{
|
{
|
||||||
dhcpcd.EraseLine(line);
|
const std::string &lineValue = dhcpcd.GetLineValue(line);
|
||||||
}
|
if (lineValue.length() > 0 && (lineValue[0] == ' ' || lineValue[0] == '\t'))
|
||||||
else
|
{
|
||||||
{
|
dhcpcd.EraseLine(line);
|
||||||
break;
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (line == -1)
|
||||||
|
{
|
||||||
|
dhcpcd.AppendLine("");
|
||||||
|
line = dhcpcd.GetLineCount();
|
||||||
|
}
|
||||||
|
// interface p2p-wlan0-0
|
||||||
|
// static ip_address=172.24.0.1/16 (trying int on .1.)
|
||||||
|
// domain_name_server=172.24.0.1
|
||||||
|
|
||||||
|
dhcpcd.InsertLine(line++, "interface p2p-wlan0-0");
|
||||||
|
dhcpcd.InsertLine(line++, " static ip_address=" P2P_INTERFACE_ADDR);
|
||||||
|
dhcpcd.InsertLine(line++, " nohook wpa_supplicant");
|
||||||
|
// dhcpcd.InsertLine(line++, " domain_name_servers=" P2P_IP_ADDRESS);
|
||||||
|
dhcpcd.Save(dhcpcdConfig);
|
||||||
}
|
}
|
||||||
if (line == -1)
|
|
||||||
|
// **************** start services ************
|
||||||
|
|
||||||
|
cout << "Starting P2P services." << endl;
|
||||||
|
sysExec("rfkill unblock wlan");
|
||||||
|
|
||||||
|
sysExec(SYSTEMCTL_BIN " daemon-reload");
|
||||||
|
|
||||||
|
sysExec(SYSTEMCTL_BIN " stop pipedal_p2pd");
|
||||||
|
sysExec(SYSTEMCTL_BIN " restart dhcpcd");
|
||||||
|
sysExec(SYSTEMCTL_BIN " start wpa_supplicant");
|
||||||
|
sysExec(SYSTEMCTL_BIN " enable wpa_supplicant"); // ?? Not sure that's still right. :-/
|
||||||
|
sysExec(SYSTEMCTL_BIN " start dnsmasq");
|
||||||
|
sysExec(SYSTEMCTL_BIN " enable dnsmasq");
|
||||||
|
sysExec(SYSTEMCTL_BIN " start pipedal_p2pd");
|
||||||
|
if (sysExec(SYSTEMCTL_BIN " start pipedal_p2pd") != 0)
|
||||||
{
|
{
|
||||||
dhcpcd.AppendLine("");
|
throw PiPedalException("Unable to start the Wi-Fi Direct access point.");
|
||||||
line = dhcpcd.GetLineCount();
|
|
||||||
}
|
}
|
||||||
// interface p2p-wlan0-0
|
|
||||||
// static ip_address=172.24.0.1/16 (trying int on .1.)
|
|
||||||
// domain_name_server=172.24.0.1
|
|
||||||
|
|
||||||
dhcpcd.InsertLine(line++, "interface p2p-wlan0-0");
|
sysExec(SYSTEMCTL_BIN " enable pipedal_p2pd");
|
||||||
dhcpcd.InsertLine(line++, " static ip_address=" P2P_INTERFACE_ADDR);
|
sysExec(SYSTEMCTL_BIN " restart pipedald");
|
||||||
dhcpcd.InsertLine(line++, " nohook wpa_supplicant");
|
|
||||||
//dhcpcd.InsertLine(line++, " domain_name_servers=" P2P_IP_ADDRESS);
|
|
||||||
dhcpcd.Save(dhcpcdConfig);
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
catch (const std::exception &e)
|
||||||
// **************** start services ************
|
{
|
||||||
|
cout << e.what() << endl;
|
||||||
cout << "Starting services." << endl;
|
|
||||||
sysExec("rfkill unblock wlan");
|
|
||||||
|
|
||||||
sysExec(SYSTEMCTL_BIN " daemon-reload");
|
|
||||||
|
|
||||||
sysExec(SYSTEMCTL_BIN " stop pipedal_p2pd");
|
|
||||||
sysExec(SYSTEMCTL_BIN " restart dhcpcd");
|
|
||||||
sysExec(SYSTEMCTL_BIN " start wpa_supplicant");
|
|
||||||
sysExec(SYSTEMCTL_BIN " enable wpa_supplicant"); // ?? Not sure that's still right. :-/
|
|
||||||
sysExec(SYSTEMCTL_BIN " start dnsmasq");
|
|
||||||
sysExec(SYSTEMCTL_BIN " enable dnsmasq");
|
|
||||||
sysExec(SYSTEMCTL_BIN " start pipedal_p2pd");
|
|
||||||
if (sysExec(SYSTEMCTL_BIN " start pipedal_p2pd") != 0)
|
|
||||||
{
|
|
||||||
throw PiPedalException("Unable to start the Wi-Fi Direct access point.");
|
|
||||||
}
|
|
||||||
|
|
||||||
sysExec(SYSTEMCTL_BIN " enable pipedal_p2pd");
|
|
||||||
sysExec(SYSTEMCTL_BIN " restart pipedald");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -534,11 +530,11 @@ void pipedal::OnWifiUninstall()
|
|||||||
if (IsApdInstalled())
|
if (IsApdInstalled())
|
||||||
{
|
{
|
||||||
UninstallHostApd();
|
UninstallHostApd();
|
||||||
} else if (IsP2pInstalled())
|
}
|
||||||
|
else if (IsP2pInstalled())
|
||||||
{
|
{
|
||||||
UninstallP2p();
|
UninstallP2p();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
void pipedal::OnWifiInstallComplete()
|
void pipedal::OnWifiInstallComplete()
|
||||||
{
|
{
|
||||||
@@ -551,5 +547,4 @@ void pipedal::OnWifiInstallComplete()
|
|||||||
// {
|
// {
|
||||||
// sysExec(SYSTEMCTL_BIN " daemon-reload");
|
// sysExec(SYSTEMCTL_BIN " daemon-reload");
|
||||||
// }
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-1
@@ -825,11 +825,13 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Lv2Log::info("Shutting down gracefully.");
|
Lv2Log::info("Closing audio session.");
|
||||||
model.Close();
|
model.Close();
|
||||||
|
|
||||||
Lv2Log::info("Stopping web server.");
|
Lv2Log::info("Stopping web server.");
|
||||||
server->ShutDown(5000);
|
server->ShutDown(5000);
|
||||||
server->Join();
|
server->Join();
|
||||||
|
|
||||||
Lv2Log::info("Shutdown complete.");
|
Lv2Log::info("Shutdown complete.");
|
||||||
}
|
}
|
||||||
catch (const std::exception &e)
|
catch (const std::exception &e)
|
||||||
|
|||||||
@@ -1,24 +0,0 @@
|
|||||||
/*
|
|
||||||
* MIT License
|
|
||||||
*
|
|
||||||
* Copyright (c) 2022 Robin E. R. Davies
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
* this software and associated documentation files (the "Software"), to deal in
|
|
||||||
* the Software without restriction, including without limitation the rights to
|
|
||||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
* of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
* so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ Description=${DESCRIPTION}
|
|||||||
After=network.target
|
After=network.target
|
||||||
After=sound.target
|
After=sound.target
|
||||||
After=local-fs.target
|
After=local-fs.target
|
||||||
After=avahi-daemon
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user