SoapySDR: Fixed API change from version 0.7.1
This commit is contained in:
parent
88005db6a1
commit
cca768124b
|
@ -1,4 +1,4 @@
|
||||||
AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
|
AM_CPPFLAGS = -Wall -Wextra -g $(all_includes) $(SOAPY_CFLAGS)
|
||||||
|
|
||||||
noinst_LIBRARIES = libsdr.a
|
noinst_LIBRARIES = libsdr.a
|
||||||
|
|
||||||
|
|
|
@ -249,7 +249,12 @@ int soapy_open(size_t channel, const char *_device_args, const char *_stream_arg
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set up streamer */
|
/* set up streamer */
|
||||||
if (SoapySDRDevice_setupStream(sdr, &rxStream, SOAPY_SDR_RX, SOAPY_SDR_CF32, &channel, 1, &stream_args) != 0) {
|
#ifdef SOAPY_0_7_1_OR_HIGHER
|
||||||
|
if (!(rxStream = SoapySDRDevice_setupStream(sdr, SOAPY_SDR_RX, SOAPY_SDR_CF32, &channel, 1, &stream_args)))
|
||||||
|
#else
|
||||||
|
if (SoapySDRDevice_setupStream(sdr, &rxStream, SOAPY_SDR_RX, SOAPY_SDR_CF32, &channel, 1, &stream_args) != 0)
|
||||||
|
#endif
|
||||||
|
{
|
||||||
PDEBUG(DSOAPY, DEBUG_ERROR, "Failed to set RX streamer args\n");
|
PDEBUG(DSOAPY, DEBUG_ERROR, "Failed to set RX streamer args\n");
|
||||||
soapy_close();
|
soapy_close();
|
||||||
return -EIO;
|
return -EIO;
|
||||||
|
@ -369,7 +374,12 @@ int soapy_open(size_t channel, const char *_device_args, const char *_stream_arg
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set up streamer */
|
/* set up streamer */
|
||||||
if (SoapySDRDevice_setupStream(sdr, &txStream, SOAPY_SDR_TX, SOAPY_SDR_CF32, &channel, 1, &stream_args) != 0) {
|
#ifdef SOAPY_0_7_1_OR_HIGHER
|
||||||
|
if (!(txStream = SoapySDRDevice_setupStream(sdr, SOAPY_SDR_TX, SOAPY_SDR_CF32, &channel, 1, &stream_args)))
|
||||||
|
#else
|
||||||
|
if (SoapySDRDevice_setupStream(sdr, &txStream, SOAPY_SDR_TX, SOAPY_SDR_CF32, &channel, 1, &stream_args) != 0)
|
||||||
|
#endif
|
||||||
|
{
|
||||||
PDEBUG(DSOAPY, DEBUG_ERROR, "Failed to set TX streamer args\n");
|
PDEBUG(DSOAPY, DEBUG_ERROR, "Failed to set TX streamer args\n");
|
||||||
soapy_close();
|
soapy_close();
|
||||||
return -EIO;
|
return -EIO;
|
||||||
|
|
Loading…
Reference in New Issue