Mix Track to Source

Mix Track to Source 1.0.1

  • Change mix_idx field to atomic_size_t to prevent data races between the audio thread (read) and UI thread (read-write)
  • Use atomic_load/atomic_store/atomic_init for all mix_idx accesses
  • Load mix_idx into a local var in mt2s_disconnect to avoid TOCTOU
  • Add null/bounds guard at the start of mt2s_connect
  • Cast literal 1 to size_t before shifting to avoid UB in bit-shift
Back
Top