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. audiooutput
Forum Updated to NodeBB v4.3 + New Features

audiooutput

Scheduled Pinned Locked Moved Unsolved General and Desktop
23 Posts 4 Posters 5.3k Views 2 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.
  • L Offline
    L Offline
    Leopold
    wrote on last edited by
    #14

    now I had some time to play with this topic again:
    I'm still wondering where to set my loop.I did it here```

    void AudioTest::createAudioOutput()
    {
    delete m_audioOutput;
    m_audioOutput = 0;
    m_audioOutput = new QAudioOutput(m_device, m_format, this);
    m_generator->start();
    m_audioOutput->start(m_generator);
    for (int i=0;i<17;i++)
    {
    m_audioOutput->stop();
    connect(m_pushTimer, SIGNAL(timeout()), this, SLOT(update()));
    m_pushTimer->start(1000);

      m_audioOutput->start(m_generator);
    }
    
    qreal initialVolume = QAudio::convertVolume(m_audioOutput->volume(),
                                                QAudio::LinearVolumeScale,
                                                QAudio::LogarithmicVolumeScale);
    m_volumeSlider->setValue(qRound(initialVolume * 100));
    

    }
    I can compile but when it comes to running, i get a sigsev error from system.

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

      With that loop you are connecting the timeout signal 17 time, why ?

      You should also post your backtrace.

      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
      2
      • L Offline
        L Offline
        Leopold
        wrote on last edited by
        #16

        @SGaist said in audiooutput:

        With that loop you are connecting the timeout signal 17 time, why ?

        still the old problem, I want the rattling noise,then I'll continue to attapt the programm to my needs. I do not know where to place the loop.Could you have a look to the example programm and give me a hint?

        aha_1980A 1 Reply Last reply
        0
        • L Leopold

          @SGaist said in audiooutput:

          With that loop you are connecting the timeout signal 17 time, why ?

          still the old problem, I want the rattling noise,then I'll continue to attapt the programm to my needs. I do not know where to place the loop.Could you have a look to the example programm and give me a hint?

          aha_1980A Offline
          aha_1980A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on last edited by
          #17

          @Leopold why do you need a loop? please explain.

          you already have a timer and this timer call its SLOT every second. just do what you want there. if you want to stop, stop the timer.

          regards

          Qt has to stay free or it will die.

          L 1 Reply Last reply
          0
          • aha_1980A aha_1980

            @Leopold why do you need a loop? please explain.

            you already have a timer and this timer call its SLOT every second. just do what you want there. if you want to stop, stop the timer.

            regards

            L Offline
            L Offline
            Leopold
            wrote on last edited by
            #18

            @aha_1980
            have you read the complete thread?
            can you help, give me a hint!

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

              Did you try my suggestion of pre-generating the complete audio sequence ?

              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
              • L Offline
                L Offline
                Leopold
                wrote on last edited by
                #20

                no, if i generate a wav file, I can not change sequenzes while running.I could play wav.files with other means.There are complete programs for metronoms they are too big and nearly not changeable.There must be a possibility to change this small program to my needs.When I had a first look to it i thought its easy but now its a challenge. I have set the loop to different places but always get a sigsev error when app starts.

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

                  I didn't write about any file. I suggested that you create an array of data containing your sequence. Array that you'd update following the parameters you change.

                  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
                  1
                  • L Offline
                    L Offline
                    Leopold
                    wrote on last edited by
                    #22

                    I will think about that.Having sliders for changing tune, sequenze (loop) and duration of the gaps would have been more comfortable.

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

                      When changing any of these parameters, you have to modify the generated data that you send to the audio output. So I don't see the problem there.

                      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
                      1

                      • Login

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