<feed xmlns='http://www.w3.org/2005/Atom'>
<title>demo.git/src/audio, branch main</title>
<subtitle>Vide-coded 64k demo system</subtitle>
<id>https://git.taar-o.com/demo.git/atom?h=main</id>
<link rel='self' href='https://git.taar-o.com/demo.git/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.taar-o.com/demo.git/'/>
<updated>2026-05-21T06:10:47Z</updated>
<entry>
<title>style: apply clang-format</title>
<updated>2026-05-21T06:10:47Z</updated>
<author>
<name>skal</name>
<email>pascal.massimino@gmail.com</email>
</author>
<published>2026-05-21T06:10:47Z</published>
<link rel='alternate' type='text/html' href='https://git.taar-o.com/demo.git/commit/?id=d806027dcaeadcdd8d2febd88bc46b2fd2c465de'/>
<id>urn:sha1:d806027dcaeadcdd8d2febd88bc46b2fd2c465de</id>
<content type='text'>
</content>
</entry>
<entry>
<title>fix: audio &amp; effects cleanup — dead code removal, simplifications</title>
<updated>2026-05-20T21:21:59Z</updated>
<author>
<name>skal</name>
<email>pascal.massimino@gmail.com</email>
</author>
<published>2026-05-20T21:12:08Z</published>
<link rel='alternate' type='text/html' href='https://git.taar-o.com/demo.git/commit/?id=ca8acd5e7c0556bee7cb21f5ff280c5fd1f47801'/>
<id>urn:sha1:ca8acd5e7c0556bee7cb21f5ff280c5fd1f47801</id>
<content type='text'>
</content>
</entry>
<entry>
<title>fix: code review cleanup — bugs, dead code, factorization, simplification</title>
<updated>2026-05-20T21:21:59Z</updated>
<author>
<name>skal</name>
<email>pascal.massimino@gmail.com</email>
</author>
<published>2026-05-20T20:44:44Z</published>
<link rel='alternate' type='text/html' href='https://git.taar-o.com/demo.git/commit/?id=a91f89c8ea15665853176c05597760d0fcf6e0df'/>
<id>urn:sha1:a91f89c8ea15665853176c05597760d0fcf6e0df</id>
<content type='text'>
Bugs:
- B1: fix dead tempo debug (prev_tempo captured after assignment)
- B2: fix ReloadAssetsFromFile leak for disk-loaded assets; simplify DropAsset
- B3: fix get_free_pool_slot leak (unregister synth + free data on reuse)
- B4: volatile -&gt; std::atomic with acquire/release in miniaudio_backend, synth
- B5: fix unaligned reads in scene_loader (memcpy-based read_f32/read_u32)
- B6: fix shader module + BGL + pipeline layout leaks in gpu.cc, pipeline_builder

Dead code:
- D1: remove unused particle_defs.h
- D3: remove create_post_process_pipeline_simple (zero callers)
- D4: remove empty gpu_draw()
- D5: remove write-only Hybrid3D::initialized_
- D6: remove legacy pending buffer path in audio.cc

Factorization:
- F1: Effect::run_fullscreen_pass() replaces boilerplate in 5 effects
- F2: particle_common.wgsl snippet, #include in 3 WGSL shaders
- F3: gpu_create_shader_module() helper, used in 3 call sites
- F5: get_world_aabb() shared between bvh.cc and physics.cc
- F6: samples_to_seconds() replaces 6 inline expressions
- F7: gpu_create_linear/nearest_sampler use SamplerCache; add nearest() preset

Simplification:
- S9+S1: WgslSamplerType param; Scene2Effect collapsed to thin wrapper
- S4: FFT heap allocs -&gt; stack arrays (zero allocs on hot path)
- S5: ObjectType::CUBE documented as legacy alias for BOX; default changed
- S6: bind group dirty-flag in Renderer3D; remove duplicate pipeline set
- S7: create_gpu_procedural() helper in texture_manager (~80 lines removed)

37/37 tests passing.

handoff(Claude): code review batch — all items verified, no regressions.
</content>
</entry>
<entry>
<title>fix: code review cleanup — bugs, dead code, factorization (-167 lines)</title>
<updated>2026-05-20T20:44:44Z</updated>
<author>
<name>skal</name>
<email>pascal.massimino@gmail.com</email>
</author>
<published>2026-05-20T20:44:44Z</published>
<link rel='alternate' type='text/html' href='https://git.taar-o.com/demo.git/commit/?id=5d20c892dedce7bc7486acbd72fbd35da69e413e'/>
<id>urn:sha1:5d20c892dedce7bc7486acbd72fbd35da69e413e</id>
<content type='text'>
Bugs:
- B1: fix dead tempo debug (prev_tempo captured after assignment)
- B2: fix ReloadAssetsFromFile leak for disk-loaded assets; simplify DropAsset
- B3: fix get_free_pool_slot leak (unregister synth + free data on reuse)
- B4: volatile -&gt; std::atomic with acquire/release in miniaudio_backend, synth
- B5: fix unaligned reads in scene_loader (memcpy-based read_f32/read_u32)
- B6: fix shader module + BGL + pipeline layout leaks in gpu.cc, pipeline_builder

Dead code:
- D1: remove unused particle_defs.h
- D3: remove create_post_process_pipeline_simple (zero callers)
- D4: remove empty gpu_draw()
- D5: remove write-only Hybrid3D::initialized_
- D6: remove legacy pending buffer path in audio.cc

Factorization:
- F1: Effect::run_fullscreen_pass() replaces boilerplate in 5 effects
- F2: particle_common.wgsl snippet, #include in 3 WGSL shaders
- F3: gpu_create_shader_module() helper, used in 3 call sites
- F5: get_world_aabb() shared between bvh.cc and physics.cc
- F6: samples_to_seconds() replaces 6 inline expressions
- F7: gpu_create_linear/nearest_sampler use SamplerCache; add nearest() preset

37/37 tests passing.

handoff(Claude): code review batch — all items verified, no regressions.
</content>
</entry>
<entry>
<title>docs: consolidate and sync docs with current codebase state</title>
<updated>2026-03-29T08:15:38Z</updated>
<author>
<name>skal</name>
<email>pascal.massimino@gmail.com</email>
</author>
<published>2026-03-29T08:15:38Z</published>
<link rel='alternate' type='text/html' href='https://git.taar-o.com/demo.git/commit/?id=e22256e374694fd92cc55ba198d3f7b1911713fe'/>
<id>urn:sha1:e22256e374694fd92cc55ba198d3f7b1911713fe</id>
<content type='text'>
- PROJECT_CONTEXT.md: fix effect count (12→18), shader count (27→37),
  update CNN v3 pipeline description, tighten Next Up section
- TODO.md: fix priority numbering, restore GPU PCM synthesis as pending,
  streamline CNN v3 section, consolidate Future items
- doc/SEQUENCE.md: effect count 12→18
- cnn_v3/README.md: phases 1–7→1–9, test count 36→38, add phases 8–9
- cnn_v3/docs/HOWTO.md: fix dataset layout blender/photos→full/simple,
  update test counts 36→38 throughout
- doc/COMPLETED.md: archive FFT/timing/OLA fixes, remove false GPU PCM claim
- src/audio/audio_engine.cc: fix step comment numbering (6→5)
- src/audio/synth.cc: remove stale fractional_pos tempo-scaling comment

handoff(Gemini): docs now accurate — 18 effects, 37 shaders, 38/38 tests,
GPU PCM synthesis back in TODO as pending, CNN v3 dataset layout corrected.
</content>
</entry>
<entry>
<title>fix(audio): fix early timing drift in tracker, use ola_decode_frame in synth</title>
<updated>2026-03-28T19:14:59Z</updated>
<author>
<name>skal</name>
<email>pascal.massimino@gmail.com</email>
</author>
<published>2026-03-28T17:45:42Z</published>
<link rel='alternate' type='text/html' href='https://git.taar-o.com/demo.git/commit/?id=8bee7577cba9f55be8bc404038d5df959595b989'/>
<id>urn:sha1:8bee7577cba9f55be8bc404038d5df959595b989</id>
<content type='text'>
- Replaced chunk_frames truncation accumulation with accurate double-precision integration in audio_render_ahead.
- Updated tracker to use double-precision time representations for exact sample-accurate scheduling.
- Extracted ola_decode_frame to handle per-frame OLA-IDCT synthesis in synth.cc.
- Updated TODO.md for completed audio tasks.

handoff(Claude): Audio timing drift and OLA-IDCT enhancement resolved.
</content>
</entry>
<entry>
<title>fix(audio): P1-P3 fixes from audio code review</title>
<updated>2026-03-26T09:09:34Z</updated>
<author>
<name>skal</name>
<email>pascal.massimino@gmail.com</email>
</author>
<published>2026-03-26T09:09:34Z</published>
<link rel='alternate' type='text/html' href='https://git.taar-o.com/demo.git/commit/?id=8c5e41724fdfc3be24e95f48ae4b2be616404074'/>
<id>urn:sha1:8c5e41724fdfc3be24e95f48ae4b2be616404074</id>
<content type='text'>
P1 — correctness bugs:
- tracker.cc: move delete[] loop before pool reset so guard condition is valid
- audio_engine: replace tracker_reset() with tracker_init() in reset()/seek()
  so synth IDs are re-registered after synth_init() clears spectrogram slots
- spectrogram_resource_manager: set spec.version in load_procedural() (was UB)

P2 — minor bugs:
- synth.cc: move pan clamp unconditionally before debug-only block
- gen.cc: remove dead `freq` variable in generate_note_spectrogram()
- tracker.cc: remove duplicate g_sample_synth_cache clear loop

P3 — cleanup:
- Replace hardcoded 32000.0f with RING_BUFFER_SAMPLE_RATE (5 sites)
- audio.cc: extract clip_samples() helper, remove duplicated clip loops
- audio_engine: inline update_silent(), remove no-op prewarm_for_time_range()
- Remove stale comments: stdio.h include, NEW: labels, CACHING block, NOTE:
- Move TODO(timing) drift notes from source to TODO.md

handoff(Gemini): audio review implemented, 36/36 tests passing
</content>
</entry>
<entry>
<title>fix(fft): make bit_reverse_permute static, remove from public API and tests</title>
<updated>2026-03-24T06:54:59Z</updated>
<author>
<name>skal</name>
<email>pascal.massimino@gmail.com</email>
</author>
<published>2026-03-24T06:54:59Z</published>
<link rel='alternate' type='text/html' href='https://git.taar-o.com/demo.git/commit/?id=249687bee829fccbbacfdee8b90fc0d0fe3ba7d3'/>
<id>urn:sha1:249687bee829fccbbacfdee8b90fc0d0fe3ba7d3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>fix(fft): replace iterative twiddle with direct cosf/sinf, add tests A-E</title>
<updated>2026-03-24T06:52:25Z</updated>
<author>
<name>skal</name>
<email>pascal.massimino@gmail.com</email>
</author>
<published>2026-03-24T06:52:25Z</published>
<link rel='alternate' type='text/html' href='https://git.taar-o.com/demo.git/commit/?id=994c8e29bac4a5969cffb9eb913d2e74692bc71c'/>
<id>urn:sha1:994c8e29bac4a5969cffb9eb913d2e74692bc71c</id>
<content type='text'>
fft_radix2 now computes wr=cosf(angle*k)/wi=sinf(angle*k) directly per k,
eliminating float drift over long iteration runs. Iterative approach
documented in comment for reference. Tests A-E added (bit-reverse, small-N
DFT, twiddle drift, DCT small/large N). arrays_match tolerance reverted to
5e-3. TODO.md updated.

handoff(Gemini): fft twiddle fix complete, 38/38 tests passing.
</content>
</entry>
<entry>
<title>test(fft): re-enable DCT tests, document twiddle accumulation bug</title>
<updated>2026-03-23T22:12:40Z</updated>
<author>
<name>skal</name>
<email>pascal.massimino@gmail.com</email>
</author>
<published>2026-03-23T22:12:40Z</published>
<link rel='alternate' type='text/html' href='https://git.taar-o.com/demo.git/commit/?id=8a3da8213cd8ef58b04a2147f51d849b5a22e795'/>
<id>urn:sha1:8a3da8213cd8ef58b04a2147f51d849b5a22e795</id>
<content type='text'>
- Remove unused variable `bits` in bit_reverse_permute
- Re-enable previously skipped DCT correctness tests (impulse at N/2,
  sinusoidal, complex inputs) with tolerance bumped to 2e-2
- Close TODO for FFT-DCT discrepancy investigation
- Add detailed TODO for fixing twiddle factor accumulation bug in
  fft_radix2 (root cause of sign errors at large N), with step-by-step
  test plan (components A–E)

handoff(Gemini): FFT twiddle bug plan in TODO.md §"Fix FFT twiddle factor
accumulation bug". Tests currently pass at 2e-2; target &lt;1e-5 after fix.
</content>
</entry>
</feed>
