mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-01-27 01:54:44 +01:00
bruh
This commit is contained in:
parent
f08515420e
commit
dbe811b47a
@ -181,11 +181,23 @@ namespace io {
|
|||||||
if (!running) {
|
if (!running) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
spdlog::warn("==> Pa_StopStream");
|
if (streamType == MONO) {
|
||||||
|
_monoInput->stopReader();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
_stereoInput->stopReader();
|
||||||
|
}
|
||||||
|
spdlog::warn("==> Pa_AbortStream");
|
||||||
Pa_AbortStream(stream);
|
Pa_AbortStream(stream);
|
||||||
spdlog::warn("==> Pa_CloseStream");
|
spdlog::warn("==> Pa_CloseStream");
|
||||||
Pa_CloseStream(stream);
|
Pa_CloseStream(stream);
|
||||||
spdlog::warn("==> Done");
|
spdlog::warn("==> Done");
|
||||||
|
if (streamType == MONO) {
|
||||||
|
_monoInput->clearReadStop();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
_stereoInput->clearReadStop();
|
||||||
|
}
|
||||||
running = false;
|
running = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -239,7 +251,9 @@ namespace io {
|
|||||||
PaStreamCallbackFlags statusFlags, void *userData ) {
|
PaStreamCallbackFlags statusFlags, void *userData ) {
|
||||||
AudioSink* _this = (AudioSink*)userData;
|
AudioSink* _this = (AudioSink*)userData;
|
||||||
float* outbuf = (float*)output;
|
float* outbuf = (float*)output;
|
||||||
_this->_monoInput->read(_this->monoBuffer, frameCount);
|
if (_this->_monoInput->read(_this->monoBuffer, frameCount) < 0) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
float vol = powf(_this->_volume, 2);
|
float vol = powf(_this->_volume, 2);
|
||||||
for (int i = 0; i < frameCount; i++) {
|
for (int i = 0; i < frameCount; i++) {
|
||||||
@ -255,7 +269,9 @@ namespace io {
|
|||||||
PaStreamCallbackFlags statusFlags, void *userData ) {
|
PaStreamCallbackFlags statusFlags, void *userData ) {
|
||||||
AudioSink* _this = (AudioSink*)userData;
|
AudioSink* _this = (AudioSink*)userData;
|
||||||
dsp::StereoFloat_t* outbuf = (dsp::StereoFloat_t*)output;
|
dsp::StereoFloat_t* outbuf = (dsp::StereoFloat_t*)output;
|
||||||
_this->_stereoInput->read(_this->stereoBuffer, frameCount);
|
if (_this->_stereoInput->read(_this->stereoBuffer, frameCount) < 0) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// Note: Calculate the power in the UI instead of here
|
// Note: Calculate the power in the UI instead of here
|
||||||
|
|
||||||
@ -274,7 +290,9 @@ namespace io {
|
|||||||
PaStreamCallbackFlags statusFlags, void *userData ) {
|
PaStreamCallbackFlags statusFlags, void *userData ) {
|
||||||
AudioSink* _this = (AudioSink*)userData;
|
AudioSink* _this = (AudioSink*)userData;
|
||||||
dsp::StereoFloat_t* outbuf = (dsp::StereoFloat_t*)output;
|
dsp::StereoFloat_t* outbuf = (dsp::StereoFloat_t*)output;
|
||||||
_this->_monoInput->read(_this->monoBuffer, frameCount);
|
if (_this->_monoInput->read(_this->monoBuffer, frameCount) < 0) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
float vol = powf(_this->_volume, 2);
|
float vol = powf(_this->_volume, 2);
|
||||||
for (int i = 0; i < frameCount; i++) {
|
for (int i = 0; i < frameCount; i++) {
|
||||||
@ -291,7 +309,9 @@ namespace io {
|
|||||||
PaStreamCallbackFlags statusFlags, void *userData ) {
|
PaStreamCallbackFlags statusFlags, void *userData ) {
|
||||||
AudioSink* _this = (AudioSink*)userData;
|
AudioSink* _this = (AudioSink*)userData;
|
||||||
float* outbuf = (float*)output;
|
float* outbuf = (float*)output;
|
||||||
_this->_stereoInput->read(_this->stereoBuffer, frameCount);
|
if (_this->_stereoInput->read(_this->stereoBuffer, frameCount) < 0) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// Note: Calculate the power in the UI instead of here
|
// Note: Calculate the power in the UI instead of here
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user