Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Unsolved QAudioFormat with CustomData

    General and Desktop
    2
    4
    437
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      carsten.h last edited by

      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 ?

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi,

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

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 0
        • C
          carsten.h last edited by

          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.) ?

          1 Reply Last reply Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

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

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply Reply Quote 0
            • First post
              Last post