Fix panning sounds after scrolling.

This commit is contained in:
Storm Dragon committed 2026-10-14 12:50:44 -04:00
1 parent b2f558c26c
commit 8e76d2341c
14 files changed
+338 -17

No files matched your search

+20
View File
@@ -320,6 +320,7 @@ func presentDocumentResult(logger *slog.Logger, speech speechEnqueuer, result re
"source_path", result.DocumentPosition.Object.ID().Path,
"virtual_caret_offset", result.DocumentPosition.Offset,
"caret_sync_error", result.CaretErr,
"sound_geometry_error", result.DocumentSoundErr,
"braille_line_available", result.DocumentBrailleLine != nil,
"braille_read_error", result.DocumentBrailleErr)
}
@@ -406,6 +407,25 @@ func presentDocumentResult(logger *slog.Logger, speech speechEnqueuer, result re
fallbackText = fallbackSpeech.Text
}
}
if len(cues) > 0 && logger.Enabled(context.Background(), slog.LevelDebug) {
// Record the captured geometry actually used for cue generation.
// Linked headings use the link's geometry independently of the heading.
attributes := []any{
"bus", result.DocumentPosition.Snapshot.BusName,
"source_path", result.DocumentPosition.Snapshot.Path,
"role", result.DocumentPosition.Snapshot.Role,
"spatialize_object_sounds", options.SpatializeObjectSounds,
"sound_geometry", result.DocumentPosition.Snapshot.SoundGeometry,
"cues", cues,
}
if link := result.DocumentPosition.LinkedHeading; link != nil {
attributes = append(attributes,
"linked_heading_bus", link.BusName,
"linked_heading_path", link.Path,
"linked_heading_sound_geometry", link.SoundGeometry)
}
logger.Debug("document navigation sound positioning", attributes...)
}
role = result.DocumentPosition.Snapshot.Role
if result.DocumentWrapped {
if result.DocumentBackwards {