More work on audio

This commit is contained in:
Pax1601
2024-09-04 19:41:05 +02:00
parent a64ccab15f
commit 9bbcdac704
22 changed files with 555 additions and 291 deletions

View File

@@ -74,6 +74,7 @@ import {
faPeopleGroup,
faQuestionCircle,
faRoute,
faVolumeHigh,
faXmarksLines,
} from "@fortawesome/free-solid-svg-icons";
import { FaXmarksLines } from "react-icons/fa6";
@@ -850,6 +851,19 @@ export abstract class Unit extends CustomMarker {
}
);
contextActionSet.addContextAction(
this,
"speaker",
"Make audio source",
"Make this unit an audio source (loudspeakers)",
faVolumeHigh,
null,
(units: Unit[], _1, _2) => {
units.forEach((unit) => getApp().getAudioManager().addUnitSink(unit));
},
{ executeImmediately: true }
);
contextActionSet.addDefaultContextAction(
this,
"default",