Skip to content

Commit

Permalink
Fix wrong remote:scale argument parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
vsonnier committed Mar 1, 2019
1 parent 594af0e commit 7a2a857
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion client/Streaming.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ SoapySDR::Stream *SoapyRemoteDevice::setupStream(
//use the native scale factor when the remote format is native,
//otherwise the default scale factor is the max signed integer
double scaleFactor = (remoteFormat == nativeFormat)?nativeScaleFactor:double(1 << ((SoapySDR::formatToSize(remoteFormat)*4)-1));
const auto scaleFactorIt = args.find(SOAPY_REMOTE_KWARG_SCALAR);
const auto scaleFactorIt = args.find(SOAPY_REMOTE_KWARG_SCALE);
if (scaleFactorIt != args.end()) scaleFactor = std::stod(scaleFactorIt->second);

//determine reliable stream mode with tcp or datagram mode
Expand Down
4 changes: 2 additions & 2 deletions common/SoapyRemoteDefs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
//! Stream args key to set the format on the remote server
#define SOAPY_REMOTE_KWARG_FORMAT (SOAPY_REMOTE_KWARG_PREFIX "format")

//! Stream args key to set the scalar for local float conversions
#define SOAPY_REMOTE_KWARG_SCALAR (SOAPY_REMOTE_KWARG_PREFIX "scalar")
//! Stream args key to set the scale for local float conversions
#define SOAPY_REMOTE_KWARG_SCALE (SOAPY_REMOTE_KWARG_PREFIX "scale")

//! Stream args key to set the buffer MTU bytes for network transfers
#define SOAPY_REMOTE_KWARG_MTU (SOAPY_REMOTE_KWARG_PREFIX "mtu")
Expand Down

0 comments on commit 7a2a857

Please sign in to comment.