audiooutput
-
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. -
With that loop you are connecting the timeout signal 17 time, why ?
You should also post your backtrace.
-
@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?
-
Did you try my suggestion of pre-generating the complete audio sequence ?
-
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.
-
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.
-
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.