Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Get format from audio file dynamically
Qt 6.11 is out! See what's new in the release blog

Get format from audio file dynamically

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 930 Views 1 Watching
  • 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.
  • R Offline
    R Offline
    Rednemus
    wrote on last edited by
    #1

    Hello,
    I want to build a music player and support files like mp3 or vorbiss. Each music files will be treated so I need to use the QAudioDecoder class.
    I've managed to open wav files with static audio format but i need to get audio format from each files and i don't really get how to do that.
    Is there a class in Qt that can help me ?

    Thank you

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      What do you mean by "treated" ?

      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
      0
      • R Offline
        R Offline
        Rednemus
        wrote on last edited by
        #3

        Hi SGaist,

        I want to normalize sounds in "realtime" in two phases.
        Firstly, I need to do a moving average treatment on the signal to make it smoother and get the maximum amplitude.
        Secondly, i'll normalize the volume of the sound in the same time it is playing.

        sorry for my poor english :)

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          You can get the info from the QAudioDecoder class which by defaults sets the format to the one of the media you opened.

          If I understood correctly you can also assign the format you would like to have but you have to do it when the decoder is stopped.

          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
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved