mirror of
https://github.com/Boof2015/astra-mobile.git
synced 2026-08-19 04:06:43 +02:00
m4
This commit is contained in:
@@ -18,6 +18,8 @@ interface SpectrumCurveProps {
|
||||
height: number;
|
||||
/** Pull native spectrum frames while active, bypassing React per-frame state. */
|
||||
active?: boolean;
|
||||
/** Which native tap to pull from. 'post' is the post-EQ ring (EQ screen). */
|
||||
source?: 'pre' | 'post';
|
||||
/** Number of render points when active. Defaults to one point per rendered pixel. */
|
||||
pointCount?: number;
|
||||
/** Active render cadence. 0 means display-sync; 32 keeps the mini-player battery-friendly. */
|
||||
@@ -292,6 +294,7 @@ export function SpectrumCurve({
|
||||
width,
|
||||
height,
|
||||
active = false,
|
||||
source = 'pre',
|
||||
pointCount,
|
||||
frameMs = MINI_FRAME_MS,
|
||||
analysisFrameMs,
|
||||
@@ -391,7 +394,11 @@ export function SpectrumCurve({
|
||||
raf = requestAnimationFrame(tick);
|
||||
if (analysisThreshold <= 0 || t - lastAnalysis >= analysisThreshold) {
|
||||
lastAnalysis = t;
|
||||
if (AstraScope.getSpectrumFrame(spectrumBins) > 0) {
|
||||
const got =
|
||||
source === 'post'
|
||||
? AstraScope.getSpectrumFramePostEq(spectrumBins)
|
||||
: AstraScope.getSpectrumFrame(spectrumBins);
|
||||
if (got > 0) {
|
||||
writeSpectrumPoints(spectrumBins, renderValues, pointOptions);
|
||||
hasNewFrame = true;
|
||||
}
|
||||
@@ -425,6 +432,7 @@ export function SpectrumCurve({
|
||||
lineOpacity,
|
||||
lineWidth,
|
||||
resolvedPointCount,
|
||||
source,
|
||||
tiltDbPerOctave,
|
||||
width,
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user