clavarium 0.2.191-next.1 → 0.2.192-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "clavarium",
3
- "version": "0.2.191-next.1",
3
+ "version": "0.2.192-next.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "clavarium",
9
- "version": "0.2.191-next.1",
9
+ "version": "0.2.192-next.1",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@xterm/addon-fit": "^0.11.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clavarium",
3
- "version": "0.2.191-next.1",
3
+ "version": "0.2.192-next.1",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "description": "A conversation is a VM with a terminal in it. Everything else is a folder.",
package/server/boxes.mjs CHANGED
@@ -379,6 +379,7 @@ export class Boxes {
379
379
  socket, send, waiting: new Map(), heardAt: 0, muted: null, volume: null,
380
380
  box: () => this.#all().find((b) => b.id === box.id) ?? box,
381
381
  play: (pcm, then = null) => {
382
+ pcm = pcm.subarray(0, pcm.length & ~1); /* whole samples only: an odd byte shifts every sample after it */
382
383
  send({ t: 'speak.start', rate: 16_000 });
383
384
  for (let at = 0; at < pcm.length; at += 640) if (socket.readyState === 1) socket.send(pcm.subarray(at, at + 640));
384
385
  send({ t: 'speak.end', ...(then ? { then } : {}) });