Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QAudioFormat with CustomData



  • we are building a custom visualization, where I have a data rate of about 650 Samples per second (so 650 Hz) and 8 or 16 Channels. The main idea I have is to use QAudioFormat for this. Any idea if this might work ?


  • Lifetime Qt Champion

    Hi,

    Might be a silly question but are these sample actual sound ?
    What kind of visualisation do you have in mind ?



  • Hi,
    no it is not "sound" but actual data which represents a wave based on a kind of amplitude. So for every sample I have 2 float values (where one is the amplitude to be visualized). So this will be scaled down to be a value between 0 and 1. So here we have a vertical line to be shown where the amplitude will result into the line height. The second float value will converted to a "color".
    Next I have also a sample rate (about 500 per Second) plus 4 or 8 channels. So everything in fact is similar to sound and I was just wondering if I can delegate all this to the existing sound-classes (so QAudioFormat, QAudioIn/Out, QAudioBuffer, etc.) ?


  • Lifetime Qt Champion

    That rather sounds like an abuse of the API that will make your application harder to understand.


Log in to reply