bavc/qctools

support audio visualizations in player

Closed this issue · 1 comments

This pertains to this section: https://github.com/bavc/qctools/blob/main/Source/GUI/player.cpp#L696-L747

  1. definedFilters should be split into definedFilters, definedVideoFilters, and definedAudioFilters (where definedVideoFilters + definedAudioFilters = definedFilters).

  2. This existing code should be recontextualized for definedVideoFilters.
    https://github.com/bavc/qctools/blob/main/Source/GUI/player.cpp#L696-L703

and this new code for definedAudioFilters.

    QString audioSplits[] = {
        "%1",
        "%1asplit=2[a1][a2];",
        "%1asplit=3[a1][a2][a3];",
        "%1asplit=4[a1][a2][a3][a4];",
        "%1asplit=5[a1][a2][a3][a4][a5];",
        "%1asplit=6[a1][a2][a3][a4][a5][a6];"
    };
  1. This existing code should be recontextualized for definedVideoFilters.
    https://github.com/bavc/qctools/blob/main/Source/GUI/player.cpp#L730-L737
    and it needs a similar variant for definedAudioFilters, such as:
    QString xstack_audio_inputs[] = {
        "",
        "[b1][b2]",
        "[b1][b2][b3]",
        "[b1][b2][b3][b4]",
        "[b1][b2][b3][b4][b5]",
        "[b1][b2][b3][b4][b5][b6]"
    };
  1. The code at https://github.com/bavc/qctools/blob/main/Source/GUI/player.cpp#L712-L726 should be recontextualized for definedVideoFilters and a new variant can be for definedAudioFilters, such as:
if(definedAudioFilters.length() == 1) {
    audioFilterString = definedAudioFilters[0];
} else {
    for(int i = 0; i < definedAudioFilters.length(); ++i) {
        filterString += QString("[a%1]%2[b%1];").arg(i + 1).arg(definedAudioFilters[i]);
    }
}

Note: I'm not going to have fit-to-grid conditionally impact how this filterchain is constructed

closed via #762