Opendigitalradio / ODR-DabMod

ODR-DabMod is a DAB (Digital Audio Broadcasting) modulator, part of the ODR-mmbTools.
https://www.opendigitalradio.org
Other
49 stars 32 forks source link

Output file s16 seems corrupt #32

Closed F5OEO closed 5 years ago

F5OEO commented 5 years ago

Maybe a misunderstanding, but output 16bit file(should be litlle endian) seems to be without negative value.

Here is the result of samples : First 2 lines : I/Q signed int 16bits (s16 format) Next 2 lines : I/Q signed 8 (s8 format)

Note : running on Raspberry

dab16bits

ghost commented 5 years ago

Hi Evariste! ;)

Is mentioning that the other output (other than s8) are 32-bit complex floats useful?

R.

On Thu, 6 Dec 2018, 11:52 F5OEO <notifications@github.com wrote:

Maybe a misunderstanding, but output 16bit file(should be litlle endian) seems to be without negative value.

Here is the result of samples : First 2 lines : I/Q signed int 16bits (s16 format) Next 2 lines : I/Q signed 8 (s8 format)

Note : running on Raspberry

[image: dab16bits] http://url

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Opendigitalradio/ODR-DabMod/issues/32, or mute the thread https://github.com/notifications/unsubscribe-auth/AIbPHw0mX3Pk1sTZW_Zj2Lmd0-ECFNLLks5u2QUAgaJpZM4ZGW2P .

F5OEO commented 5 years ago

Thanks Rash, I better understand. On LimeSDR, to have less USB bandwidth, it should be better to have s16 iq instead of real. I will translate it on dabmod side or Limesdrsend.

mpbraendli commented 5 years ago

Bonjour Evariste,

That looks wrong indeed. I guess (from your screenshot) that you opened it in audacity, so I tried the same (Raw import, signed 16-bits, little-endian, stereo, 2048Hz) image

Length seems correct too.

Do you think the format converter does something wrong on 32-bit systems or on ARM?

https://github.com/Opendigitalradio/ODR-DabMod/blob/master/src/FormatConverter.cpp#L55

PS: The SoapySDR API also presents options for over-the-wire format, maybe that's an easy way to reduce bandwidth.

F5OEO commented 5 years ago

Replace https://github.com/Opendigitalradio/ODR-DabMod/blob/5bb71419937a4d8919ef33df088f73e6c705b028/src/FormatConverter.cpp#L57 by int16_t out = reinterpret_cast<int16_t>(dataOut->getData());

Works OK now !

mpbraendli commented 5 years ago

facepalm

But why did it work here?!?

Anyway, fixed in 5d825e7

ghost commented 5 years ago

This explains a few things...and a few very long, non-productive days...

Thanks! :-D

On Fri, 7 Dec 2018 at 16:01, Matthias P. Braendli notifications@github.com wrote:

[image: facepalm] https://camo.githubusercontent.com/46e5ad55dd909e694b3eabbbc470a422e524fd1c/68747470733a2f2f6d656469612e67697068792e636f6d2f6d656469612f336f74506f746e476c413546534632664b772f67697068792e676966

But why did it work here?!?

Anyway, fixed in 5d825e7 https://github.com/Opendigitalradio/ODR-DabMod/commit/5d825e7586814d47f29d3b4324effb36c6acd9ed

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Opendigitalradio/ODR-DabMod/issues/32#issuecomment-445277699, or mute the thread https://github.com/notifications/unsubscribe-auth/AIbPH2mxjMrTpaCrpdqb_17_aSXF6l9vks5u2pC-gaJpZM4ZGW2P .