QAudioOutput not play with correct timming on Android



  • My application is using QAudioOutput to play a previously audio captured with QAudioInput, but the audio reproduced seems like was played at maximum speed possible by the CPU phone, not with the correct timming. How can reproduce the sound with the timming specified on format?

    QAudioFormat format;
    format.setSampleRate(8000);
    format.setChannelCount(1);
    format.setSampleSize(16);
    format.setCodec("audio/pcm");
    format.setByteOrder(QAudioFormat::LittleEndian);
    format.setSampleType(QAudioFormat::SignedInt);
    
    QBuffer *buffer = new QBuffer(data);
    buffer->open(QIODevice::ReadOnly);
    QAudioOutput *audioOutput = new QAudioOutput();
    audioOutput->start(buffer);
    

Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.