Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6099941
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:19:48+00:00 2026-05-23T13:19:48+00:00

I trying to create application on qt with capability of making voice calls through

  • 0

I trying to create application on qt with capability of making voice calls through GSM modem. Now i’m searching for library which can capture voice from micro and has ability to regulate voice volume. Qt’s phonon have voice regulation, but does not have ability to capture data from microphone.

From the other side, there is QtMultimedia, which can capture such data but could not regulate volume.

Is there any lib for c++ which could do both tasks, and is portable through win|mac|linux?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T13:19:48+00:00Added an answer on May 23, 2026 at 1:19 pm

    finally I done this with QtMultimedia + subclassing QIODevice.

    On input and output I have pcm format, signed, so I just multiply byte value of input\output stream with some float value to set volume level, after that I write data to device i need.

    class VOICEIO_EXPORT VoiceIOAdapter : public QIODevice
    {
        Q_OBJECT
    
    public:
        VoiceIOAdapter(QObject *parent,QIODevice* dev);
        VoiceIOAdapter(QObject *parent);
        ~VoiceIOAdapter();
        void setUnderlyingDevice(QIODevice* dev);
        QIODevice* getUnderlyingDevice() const;
            ... /*some qiodevice virtual functions reimplemented*/
            ...
        float getOutVolume()const;
        float getInVolume() const;
    public slots:
        void setOutVolume(float);
        void setInVolume(float);
    protected:
        QIODevice* underlyingDevice;
        virtual qint64  readData ( char * data, qint64 maxSize );
        virtual qint64  writeData ( const char * data, qint64 maxSize );
        void applyVolume(float value, QByteArray& input);
        float outVolume;//1
        float inVolume;//1
    };
    
    
    void VoiceIOAdapter::applyVolume(float value, QByteArray& input)
    {
        Q_ASSERT(!(input.size()%2)); //SHORT,Signed,LE
        qint16* data=reinterpret_cast<qint16*>(input.data());
        qint32 tmp;
        for(int i=0;i<input.size()/2;i++)
        {
            tmp=qint32(float(data[i])*value);
            if(tmp>std::numeric_limits<qint16>::max())
            {
                tmp=std::numeric_limits<qint16>::max();
            }
            else if (tmp<std::numeric_limits<qint16>::min())
            {
                tmp=std::numeric_limits<qint16>::min();
            }
            data[i]=tmp;
        }
    }
    
    qint64  VoiceIOAdapter::readData ( char * data, qint64 maxSize )
    {
        if(!underlyingDevice)
        {
            return -1;
        }
            QByteArray decoded(maxSize ,0);
        qint64 result=underlyingDevice->read(decoded.data(),maxSize);
        if(result>0)
        {
                    decoded.resize(result);
            applyVolume(inVolume,decoded);
            memcpy(data,decoded.data(),decoded.size());
        }
        return result;
    }
    
    qint64  VoiceIOAdapter::writeData ( const char * data, qint64 maxSize )
    {
        if(!underlyingDevice)
        {
            return -1;
        }
        QByteArray encoded(data,maxSize);
        applyVolume(outVolume,encoded);
        qint64 result=underlyingDevice->write(encoded.data(),maxSize );
        return result;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create an application where there is a JSplitPane which contains the
I am trying to create an application can modify properties in IL to create
I am trying to create an application which requires a two table SQLite database
I am trying to create an application where users can select a date and
I'm trying create a RCP Application with Eclipse, but I can't get past the
I am trying to create an application which allows background threads to update core
I'm trying to create an application that can use the android as a fax
I'm trying to create an application which will stop all other phone functionalities until
I am trying to create an application which retrieves the users favourite book quote
I am trying to create application, which sould work this way: User dial a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.