Skip to content

Precision audio i64 timestamps f64 - #1492

Merged
poco0317 merged 2 commits into
etternagame:developfrom
BudEBoy-Real:precision-audio-i64-timestamps-f64
Nov 13, 2026
Merged

poco0317 merged 2 commits into
etternagame:developfrom
BudEBoy-Real:precision-audio-i64-timestamps-f64

Conversation

@BudEBoy-Real

Copy link
Copy Markdown

Audio frame counters were i32 / f32, Files longer than ~13.5 hours would overflow, and graphs would get visible quantization lines after 9 hours

  • RageSoundReader pipeline: frame counts i32 -> i64
  • RageSound position reporting: f32 -> f64 seconds
  • RageTimer / SongPosition / TimingData: f32 -> f64 time/beat math
  • Player hit detection: compute music seconds in double so hit offsets on long files are not quantized to f32, saved offsets stay float for scoring
  • GameState::UpdateSongPosition takes double so you can skip later into a file in practice mode

Scoring is unchanged (Didn't fix the marathon accuracy bug).

poco0317 and others added 2 commits September 7, 2026 22:32
…ming

Audio frame counters (RageSoundReader Read/SetPosition/GetNextSourceFrame,
RageSound position maps, RageSound::GetPositionSeconds) were 32-bit int /
float. Files longer than ~13.3 hours at 44.1kHz overflow INT_MAX frames,
and float seconds quantize badly long before that (f32 ULP is ~7.8ms at
2^17 seconds).

- RageSoundReader pipeline: frame counts int -> int64_t
- RageSound position reporting: float -> double seconds
- RageTimer / SongPosition / TimingData: float -> double time/beat math
- Player hit detection: compute music seconds in double so hit offsets
  on long files are not quantized to the float32 ULP grid (visible as
  quantization lines in judgment scatterplots); offsets stay float
- GameState::UpdateSongPosition takes double

Scoring is unchanged (offsets, wife2/3, dance points remain float/int).
@poco0317
poco0317 merged commit 67bd8b3 into etternagame:develop Nov 13, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants