• Craig Watson's avatar
    Podcast recording on OSX fixed. Details: · 427cdbb6
    Craig Watson authored
    The threading logic was changed somewhat. UBQuickTimeFile's run()
    function no longer handles enqueuing the video/audio samples in a while
    loop. Instead, it runs once, and uses Apple's Dispatch Queues to handle
    enqueuing samples.
    One dispatch queue was thus added for each input to the AssetWriter.
    Each input is associated to one queue, and the requestMediaDataWhenReady
    function insures that the inputs go and fetch any available samples when
    they are able to write them.
    
    As tested (for short podcasts, repeatedly), this solves all the problems
    encountered earlier, such as the program hanging due to one input not
    being ready, or corrupt files due (presumably) to missing samples.
    427cdbb6
UBAudioQueueRecorder.cpp 10.8 KB