@hyperframes/studio-server 0.8.218 → 0.8.220

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.
@@ -370,10 +370,12 @@ function absoluteLoudnessPlan(track, targetLufs = DEFAULT_TARGET_LUFS) {
370
370
  ["gain-ceiling", MAX_AUDIO_GAIN_DB],
371
371
  ["true-peak", peakRoomDb]
372
372
  ];
373
- const [limitedBy, appliedGainDb] = limits.reduce(
373
+ const [limitedBy, limitedGainDb] = limits.reduce(
374
374
  (lowest, candidate) => candidate[1] < lowest[1] - 1e-9 ? candidate : lowest
375
375
  );
376
376
  const previousGainDb = track.volume > 0 ? gainDb(track.volume) : 0;
377
+ const limitCannotCutAWantedBoost = wantedGainDb > previousGainDb;
378
+ const appliedGainDb = limitCannotCutAWantedBoost ? Math.max(limitedGainDb, previousGainDb) : limitedGainDb;
377
379
  return {
378
380
  targetId: track.id,
379
381
  targetLufs,
@@ -387,6 +389,10 @@ function absoluteLoudnessPlan(track, targetLufs = DEFAULT_TARGET_LUFS) {
387
389
  limitedBy
388
390
  };
389
391
  }
392
+ function absoluteOutcome(plan, tolerance) {
393
+ if (Math.abs(plan.changeDb) > tolerance) return "change";
394
+ return Math.abs(plan.projectedLufs - plan.targetLufs) <= tolerance ? "matched" : "held";
395
+ }
390
396
 
391
397
  export {
392
398
  requestSubPath,
@@ -403,5 +409,6 @@ export {
403
409
  requiredFfmpeg,
404
410
  DEFAULT_TARGET_LUFS,
405
411
  NORMALIZE_TRUE_PEAK_CEILING_DBFS,
406
- absoluteLoudnessPlan
412
+ absoluteLoudnessPlan,
413
+ absoluteOutcome
407
414
  };
@@ -83,5 +83,7 @@ interface AbsoluteLoudnessPlan {
83
83
  * names which limit stopped it.
84
84
  */
85
85
  declare function absoluteLoudnessPlan(track: NormalizationTrack, targetLufs?: number): AbsoluteLoudnessPlan;
86
+ type AbsoluteOutcome = "matched" | "held" | "change";
87
+ declare function absoluteOutcome(plan: AbsoluteLoudnessPlan, tolerance: number): AbsoluteOutcome;
86
88
 
87
- export { type AbsoluteLoudnessPlan, type AudioNormalizationPlan, type AudioTag, DEFAULT_TARGET_LUFS, type LoudnessLimit, type LoudnessMeasurement, type MeasuredWindow, NORMALIZE_TRUE_PEAK_CEILING_DBFS, type NormalizationTrack, absoluteLoudnessPlan, audioNormalizationPlan, audioTags, gainDb, loudnessMeasureArgs, measureAudio, parseEbur128Summary, requiredFfmpeg, resolveLocalAudioPath, updateAudioVolume };
89
+ export { type AbsoluteLoudnessPlan, type AbsoluteOutcome, type AudioNormalizationPlan, type AudioTag, DEFAULT_TARGET_LUFS, type LoudnessLimit, type LoudnessMeasurement, type MeasuredWindow, NORMALIZE_TRUE_PEAK_CEILING_DBFS, type NormalizationTrack, absoluteLoudnessPlan, absoluteOutcome, audioNormalizationPlan, audioTags, gainDb, loudnessMeasureArgs, measureAudio, parseEbur128Summary, requiredFfmpeg, resolveLocalAudioPath, updateAudioVolume };
@@ -2,6 +2,7 @@ import {
2
2
  DEFAULT_TARGET_LUFS,
3
3
  NORMALIZE_TRUE_PEAK_CEILING_DBFS,
4
4
  absoluteLoudnessPlan,
5
+ absoluteOutcome,
5
6
  audioNormalizationPlan,
6
7
  audioTags,
7
8
  gainDb,
@@ -11,7 +12,7 @@ import {
11
12
  requiredFfmpeg,
12
13
  resolveLocalAudioPath,
13
14
  updateAudioVolume
14
- } from "../chunk-EGNSA3MU.js";
15
+ } from "../chunk-H4NVSSDJ.js";
15
16
  import "../chunk-X73QTST2.js";
16
17
  import "../chunk-QF7MFJJU.js";
17
18
  import "../chunk-SVQFE44C.js";
@@ -20,6 +21,7 @@ export {
20
21
  DEFAULT_TARGET_LUFS,
21
22
  NORMALIZE_TRUE_PEAK_CEILING_DBFS,
22
23
  absoluteLoudnessPlan,
24
+ absoluteOutcome,
23
25
  audioNormalizationPlan,
24
26
  audioTags,
25
27
  gainDb,
package/dist/index.js CHANGED
@@ -78,7 +78,7 @@ import {
78
78
  requestedProjectPath,
79
79
  requiredFfmpeg,
80
80
  resolveLocalAudioPath
81
- } from "./chunk-EGNSA3MU.js";
81
+ } from "./chunk-H4NVSSDJ.js";
82
82
  import {
83
83
  injectMediaCodecMap,
84
84
  isAutoProxyEnabled,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperframes/studio-server",
3
- "version": "0.8.218",
3
+ "version": "0.8.220",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/heygen-com/hyperframes",
@@ -84,8 +84,8 @@
84
84
  "linkedom": "^0.18.12",
85
85
  "postcss": "^8.5.8",
86
86
  "postcss-selector-parser": "^7.1.2",
87
- "@hyperframes/core": "0.8.218",
88
- "@hyperframes/parsers": "0.8.218"
87
+ "@hyperframes/core": "0.8.220",
88
+ "@hyperframes/parsers": "0.8.220"
89
89
  },
90
90
  "devDependencies": {
91
91
  "@types/node": "^25.0.10",