Skip to content

Commit

Permalink
fix: fucked indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Neko-Life committed Oct 20, 2024
1 parent 72801c3 commit 22521c5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
1 change: 0 additions & 1 deletion src/dpp/discordvoiceclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,6 @@ discord_voice_client& discord_voice_client::set_send_audio_type(send_audio_type_

discord_voice_client& discord_voice_client::speak() {
if (!this->sending) {
std::cout << "Sending voice_opcode_client_speaking\n";
this->queue_message(json({
{"op", voice_opcode_client_speaking},
{"d", {
Expand Down
6 changes: 3 additions & 3 deletions src/dpp/voice/enabled/courier_loop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ void discord_voice_client::voice_courier_loop(discord_voice_client& client, cour
* we can only pretend there is an event, without any raw payload byte.
*/
voice_receive_t vr(nullptr, "", &client, d.user_id,
reinterpret_cast<uint8_t *>(flush_data_pcm),
lost_packet_samples * opus_channel_count * sizeof(opus_int16));
reinterpret_cast<uint8_t *>(flush_data_pcm),
lost_packet_samples * opus_channel_count * sizeof(opus_int16));

park_count = audio_mix(client, *client.mixer, pcm_mix, flush_data_pcm, park_count, lost_packet_samples, max_samples);
client.creator->on_voice_receive.call(vr);
Expand Down Expand Up @@ -283,7 +283,7 @@ void discord_voice_client::voice_courier_loop(discord_voice_client& client, cour
}

voice_receive_t vr(nullptr, "", &client, 0, reinterpret_cast<uint8_t *>(pcm_downsample),
max_samples * opus_channel_count * sizeof(opus_int16));
max_samples * opus_channel_count * sizeof(opus_int16));

client.creator->on_voice_receive_combined.call(vr);
}
Expand Down
10 changes: 5 additions & 5 deletions src/dpp/voice/enabled/read_ready.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ void discord_voice_client::read_ready()
}

voice_payload vp{0, // seq, populate later
0, // timestamp, populate later
std::make_unique<voice_receive_t>(nullptr, std::string(reinterpret_cast<char*>(buffer), packet_size))};
0, // timestamp, populate later
std::make_unique<voice_receive_t>(nullptr, std::string(reinterpret_cast<char*>(buffer), packet_size))};

vp.vr->voice_client = this;

Expand Down Expand Up @@ -103,7 +103,7 @@ void discord_voice_client::read_ready()

int opus_error = 0;
decoder.reset(opus_decoder_create(opus_sample_rate_hz, opus_channel_count, &opus_error),
&opus_decoder_destroy);
&opus_decoder_destroy);
if (opus_error) {
/**
* NOTE: The -10 here makes the opus_error match up with values of exception_error_code,
Expand All @@ -127,8 +127,8 @@ void discord_voice_client::read_ready()
if (!voice_courier.joinable()) {
/* Courier thread is not running, start it */
voice_courier = std::thread(&voice_courier_loop,
std::ref(*this),
std::ref(voice_courier_shared_state));
std::ref(*this),
std::ref(voice_courier_shared_state));
}
}

Expand Down

0 comments on commit 22521c5

Please sign in to comment.