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. [Solved] How to generate a silence audio file? ||How to write in silence audio?
Forum Updated to NodeBB v4.3 + New Features

[Solved] How to generate a silence audio file? ||How to write in silence audio?

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 6.3k 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.
  • S Offline
    S Offline
    scroverty
    wrote on last edited by
    #1

    Hello everyone!

    As the title said, how can I generate a silence audio file?

    Like, a sound file, but it's muted, and have difference duration like 1 minutes, 10 minutes, etc..

    Or, how can I make QFile to write in silence audio? Is there a way?

    For example, I have 1 sound file called file1.ogg, the media's duration is 10 seconds.

    So, how can I write to this file1.ogg a null sound 1 minutes long, so that after playing it's original 10 secs, the file will silence in 1 seconds then stop?

    I'm thinking of record a 1 second mute sound, then use a loop to make a file write it till the duration I need.

    But I think there might be another straight-forward way to do this ?

    Thanks for any reply!

    Alvis Ar'Berkeley Andrew.
    Pleased to meet you!

    1 Reply Last reply
    0
    • JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      You have a few options. Here are some examples; #1 is easiest, #3 is hardest:

      Download a 3rd-party program that does it: http://www.softpedia.com/get/Multimedia/Audio/Other-AUDIO-Tools/Silence.shtml (the website broke the link... copy+paste the whole link into your browser) You can also Google for others

      Use Sound Recorder (assuming you run Windows) to record silence: http://www.instructables.com/id/How-to-stop-reaccurring-annoying-phone-calls-bill/step1/creating-the-silent-sound-file/

      If you know audio processing, you can pass an array of 0's into wavwrite() in GNU Octave: http://www.gnu.org/software/octave/

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      1 Reply Last reply
      0
      • S Offline
        S Offline
        scroverty
        wrote on last edited by
        #3

        Does that mean I can't archive this with Qt's Classes?

        Alvis Ar'Berkeley Andrew.
        Pleased to meet you!

        1 Reply Last reply
        0
        • JKSHJ Offline
          JKSHJ Offline
          JKSH
          Moderators
          wrote on last edited by
          #4

          No, unless you link a 3rd-party library to your project, like libsndfile (http://www.mega-nerd.com/libsndfile/ ), and write extra code for it. This is even harder than Option #3 above (using GNU Octave)

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

          1 Reply Last reply
          0
          • S Offline
            S Offline
            scroverty
            wrote on last edited by
            #5

            Thanks JKSH, the information you provided was really helpful :)

            Cheer!

            Alvis Ar'Berkeley Andrew.
            Pleased to meet you!

            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