Add spoken spatial clock announcements with top-of-hour mode
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
||||
shouldProxyStreamUrl,
|
||||
} from './audio/radioStationRuntime';
|
||||
import { ItemEmitRuntime } from './audio/itemEmitRuntime';
|
||||
import { ClockAnnouncer } from './audio/clockAnnouncer';
|
||||
import { normalizeDegrees } from './audio/spatial';
|
||||
import {
|
||||
applyPastedText,
|
||||
@@ -243,6 +244,7 @@ const messageBuffer: string[] = [];
|
||||
let messageCursor = -1;
|
||||
const radioRuntime = new RadioStationRuntime(audio, getItemSpatialConfig);
|
||||
const itemEmitRuntime = new ItemEmitRuntime(audio, resolveIncomingSoundUrl, getItemSpatialConfig);
|
||||
const clockAnnouncer = new ClockAnnouncer(audio, () => ({ x: state.player.x, y: state.player.y }));
|
||||
let internalClipboardText = '';
|
||||
let replaceTextOnNextType = false;
|
||||
let pendingEscapeDisconnect = false;
|
||||
@@ -1658,6 +1660,9 @@ const onAppMessage = createOnMessageHandler({
|
||||
playIncomingItemUseSound: (url, x, y) => {
|
||||
void audio.playSpatialSample(url, { x, y }, { x: state.player.x, y: state.player.y }, 1);
|
||||
},
|
||||
playClockAnnouncement: (sounds, x, y) => {
|
||||
void clockAnnouncer.playSequence(sounds.map(resolveIncomingSoundUrl), x, y);
|
||||
},
|
||||
handleAuthRequired,
|
||||
handleAuthResult,
|
||||
isPeerNegotiationReady: () => peerNegotiationReady,
|
||||
|
||||
Reference in New Issue
Block a user