Skip to content

Commit

Permalink
Merge pull request #66 from pothosware/vso_fix_remote_scale_args
Browse files Browse the repository at this point in the history
Fix wrong remote:scale argument parsing
  • Loading branch information
guruofquality authored Mar 2, 2019
2 parents 594af0e + 7a2a857 commit a6fbf2d
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 a6fbf2d

Please sign in to comment.