Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All audio modulators: input from "mic" is seriously distorted #43

Closed
f4exb opened this issue Aug 6, 2017 · 4 comments
Closed

All audio modulators: input from "mic" is seriously distorted #43

f4exb opened this issue Aug 6, 2017 · 4 comments
Assignees
Labels
Milestone

Comments

@f4exb
Copy link
Owner

f4exb commented Aug 6, 2017

This applies to all audio modulators that is as of now: AM, NFM, WFM, SSB/DSB

The input from the sound input device (turned on with the "mic" icon button) is very very distorted. It looks like the waveform is modulated (when looking at the enveloppe in AM for example). This may indicate a problem with the interfacing with the QAudioDevice in AudioInput class. The bytes seems not to be put in the correct order.

Using the same mic device and recording to a file played back in the modulator gives a correct audio. So it is not an issue with the mic.

@f4exb f4exb added the bug label Aug 6, 2017
@f4exb
Copy link
Owner Author

f4exb commented Aug 6, 2017

Noticed a few things:

  • with the file sink it seems to work normally no just select base sample rate to 96 kS/a or higher and there is the same problem as with real Tx devices
  • with the LimeSDR it works only when the channel sample rate is lower than 96 kS/s (twice the audio sample rate). This seems to indicate some problem with the interpolation using real devices

@f4exb
Copy link
Owner Author

f4exb commented Aug 6, 2017

In the modulators pullAudio overloaded virtual method:

unsigned int nbSamplesAudio = nbSamples * m_interpolatorDistance;

m_interpolatorDistance is calculated as the audio rate (48000) divided by the desired sample rate BEFORE integer interpolation. So this does not take into account the integer interpolation. This method is called only when pulling audio from the input source.

@f4exb
Copy link
Owner Author

f4exb commented Aug 6, 2017

Yes thatś it. A quick test with a baseband sample rate of 100 kS/s and factor hard divided by 2 gives correct audio. The problem is to get the baseband sample rate at channel plogin level.

@f4exb f4exb self-assigned this Aug 6, 2017
@f4exb f4exb added this to the v3.5.4 milestone Aug 6, 2017
f4exb added a commit that referenced this issue Aug 6, 2017
f4exb added a commit that referenced this issue Aug 6, 2017
f4exb added a commit that referenced this issue Aug 6, 2017
@f4exb
Copy link
Owner Author

f4exb commented Aug 6, 2017

Fixed with v3.5.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant