Changes
Summary
- mlv_snd: experiment: remove vsync dependency, just sync through the mlv_lite CBR and start audio there
- mlv_snd: fix adding to mlv_rec/mlv_lite submenu if the raw video option is turned off (properly check if either menu is present)
- mlv_snd: moved the menu inside the mlv_rec/mlv_lite submenu; fine-tuned the submenu (formatting)
- mlv_snd: enabled by default, www.magiclantern.fm/forum/index.php?topic=12793
- mlv_rec: reordered callbacks
- mlv_snd: fine tuned audio delay
- mlv_lite: removed old callbacks raw_rec_cbr_*
- mlv_rec: remove old interface raw_rec_cbr_starting()
- mlv_lite: add MLV_REC_EVENT_PREPARING to be called before recording is going to start
- mlv_rec: add MLV_REC_EVENT_PREPARING to be called before recording is going to start
- mlv_snd: changed menu name for audio sync. feature might get removed when it is not needed at all.
- mlv_snd: inverse delay logic so it can be interpreted as in the timeline. also set to 1 lets see if this is correct for all setups
- mlv_snd: cleaned up merge artifacts
- mlv_snd: made mlv_rec_queue_block optional - reduces the execution time of raw_rec_cbr_started in the vsync hook - fixes memory leak (mlv_snd expects mlv_rec to free queued blocks)
- mlv_snd: reworked to achieve better sync with mlv_lite: - sound buffer allocation is done in raw_rec_cbr_starting (which must now be called after video memory allocation) - raw_rec_cbr_started may optionally be called from the vsync hook (which runs from a task with very high priority) mlv_lite: call raw_rec_cbr_started from the vsync hook, on first frame - result: first audio frame is started ~ 2ms after the first video frame is fully captured mlv_rec: moved raw_rec_cbr_starting after memory allocation - required for mlv_snd to complete the audio memory allocation
- mlv_snd: rather than trying to queue a WAVI block into the MLV recorder, provide a mlv_fill_wavi this way, the MLV recording module can place this block wherever it wants (not necessarily in the queue) previous method still kept for compatibility with mlv_rec mlv_lite: refactored with mlv_fill_wavi and moved raw_rec_cbr_started right before the recording loop (where it should be) this should fix audio sync issues when recording starts; not tested
- mlv_lite: moved started cbr into process_frame like in 7fcd177 to help with audio sync
- mlv_snd: take care of AUDF count writing. there are still cases where the number of frames per chunk is incorrect. the sum is correct.
- mlv_lite: call callbacks earlier to be able to hook into MLVI writing
- mlv_lite: cast file_hdr to prevent warnings
- mlv_lite: call registered modules on header updates
- mlv_lite: only count VIDF blocks in chunk headers, do not count meta data