mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-02-23 12:53:58 +01:00
Merge branch 'master' of https://github.com/zakrent/SDRPlusPlus
This commit is contained in:
commit
717f2a822b
@ -179,6 +179,7 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void doStop() {
|
void doStop() {
|
||||||
|
s2m.stop();
|
||||||
monoRB.stop();
|
monoRB.stop();
|
||||||
stereoRB.stop();
|
stereoRB.stop();
|
||||||
monoRB.data.stopReader();
|
monoRB.data.stopReader();
|
||||||
|
@ -6,6 +6,7 @@ namespace sdrpp_credits {
|
|||||||
"aosync",
|
"aosync",
|
||||||
"Alexsey Shestacov",
|
"Alexsey Shestacov",
|
||||||
"Benjamin Kyd",
|
"Benjamin Kyd",
|
||||||
|
"Cropinghigh",
|
||||||
"Tobias Mädel",
|
"Tobias Mädel",
|
||||||
"Raov",
|
"Raov",
|
||||||
"Howard0su"
|
"Howard0su"
|
||||||
|
@ -38,10 +38,7 @@ namespace dsp {
|
|||||||
swapCV.wait(lck, [this]{ return (canSwap || writerStop); });
|
swapCV.wait(lck, [this]{ return (canSwap || writerStop); });
|
||||||
|
|
||||||
// If writer was stopped, abandon operation
|
// If writer was stopped, abandon operation
|
||||||
if (writerStop) {
|
if (writerStop) { return false; }
|
||||||
writerStop = false;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Swap buffers
|
// Swap buffers
|
||||||
dataSize = size;
|
dataSize = size;
|
||||||
@ -66,23 +63,22 @@ namespace dsp {
|
|||||||
std::unique_lock<std::mutex> lck(rdyMtx);
|
std::unique_lock<std::mutex> lck(rdyMtx);
|
||||||
rdyCV.wait(lck, [this]{ return (dataReady || readerStop); });
|
rdyCV.wait(lck, [this]{ return (dataReady || readerStop); });
|
||||||
|
|
||||||
// If stopped, abort
|
return (readerStop ? -1 : dataSize);
|
||||||
if (readerStop) {
|
|
||||||
readerStop = false;
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
dataReady = false;
|
|
||||||
|
|
||||||
return dataSize;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void flush() {
|
void flush() {
|
||||||
|
// Clear data ready
|
||||||
|
{
|
||||||
|
std::lock_guard<std::mutex> lck(rdyMtx);
|
||||||
|
dataReady = false;
|
||||||
|
}
|
||||||
|
|
||||||
// Notify writer that buffers can be swapped
|
// Notify writer that buffers can be swapped
|
||||||
{
|
{
|
||||||
std::lock_guard<std::mutex> lck(swapMtx);
|
std::lock_guard<std::mutex> lck(swapMtx);
|
||||||
canSwap = true;
|
canSwap = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
swapCV.notify_all();
|
swapCV.notify_all();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -224,6 +224,7 @@ I will soon publish a contributing.md listing the code style to use.
|
|||||||
* [aosync](https://github.com/aosync)
|
* [aosync](https://github.com/aosync)
|
||||||
* [Alexsey Shestacov](https://github.com/wingrime)
|
* [Alexsey Shestacov](https://github.com/wingrime)
|
||||||
* [Benjamin Kyd](https://github.com/benkyd)
|
* [Benjamin Kyd](https://github.com/benkyd)
|
||||||
|
* [cropinghigh](https://github.com/cropinghigh)
|
||||||
* [Tobias Mädel](https://github.com/Manawyrm)
|
* [Tobias Mädel](https://github.com/Manawyrm)
|
||||||
* [Raov](https://twitter.com/raov_birbtog)
|
* [Raov](https://twitter.com/raov_birbtog)
|
||||||
* [Howard0su](https://github.com/howard0su)
|
* [Howard0su](https://github.com/howard0su)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user