mirror of
https://github.com/LizardByte/Sunshine.git
synced 2025-02-06 09:39:50 +00:00
Add debug msg when receiving messages over utp for video and audio
This commit is contained in:
parent
38ec7c22fb
commit
41f4b71c99
@ -172,7 +172,7 @@ public:
|
||||
|
||||
REFERENCE_TIME default_latency;
|
||||
audio_client->GetDevicePeriod(&default_latency, nullptr);
|
||||
default_latency_ms = default_latency / 10;
|
||||
default_latency_ms = default_latency / 1000;
|
||||
|
||||
status = audio_client->Initialize(
|
||||
AUDCLNT_SHAREMODE_SHARED,
|
||||
@ -249,7 +249,6 @@ private:
|
||||
case WAIT_OBJECT_0:
|
||||
break;
|
||||
case WAIT_TIMEOUT:
|
||||
std::fill_n(std::begin(sample_buf), sample_buf.size(), 0);
|
||||
return capture_e::timeout;
|
||||
default:
|
||||
BOOST_LOG(error) << "Couldn't wait for audio event: [0x"sv << util::hex(status).to_string_view() << ']';
|
||||
@ -340,4 +339,4 @@ std::unique_ptr<mic_t> microphone(std::uint32_t sample_rate) {
|
||||
std::unique_ptr<deinit_t> init() {
|
||||
return std::make_unique<platf::audio::co_init_t>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -539,6 +539,8 @@ void recvThread(broadcast_ctx_t &ctx) {
|
||||
auto recv_func_init = [&](udp::socket &sock, int buf_elem, std::map<asio::ip::address, message_queue_t> &peer_to_session) {
|
||||
recv_func[buf_elem] = [&,buf_elem](const boost::system::error_code &ec, size_t bytes) {
|
||||
auto type_str = buf_elem ? "AUDIO"sv : "VIDEO"sv;
|
||||
BOOST_LOG(debug) << "Recv: "sv << peer.address().to_string() << ":"sv << peer.port() << " :: " << type_str;
|
||||
|
||||
|
||||
populate_peer_to_session();
|
||||
|
||||
@ -841,6 +843,7 @@ void join(session_t &session) {
|
||||
session.videoThread.join();
|
||||
BOOST_LOG(debug) << "Waiting for audio to end..."sv;
|
||||
session.audioThread.join();
|
||||
BOOST_LG(debug) << "Session ended"sv;
|
||||
}
|
||||
|
||||
void start(session_t &session, const std::string &addr_string) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user