Skip to content

Commit

Permalink
refactor: avoid hardcoded suze
Browse files Browse the repository at this point in the history
  • Loading branch information
Neko-Life committed Apr 13, 2024
1 parent 49c5afa commit c808c67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dpp/discordvoiceclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ void discord_voice_client::write_ready()
std::lock_guard<std::mutex> lock(this->stream_mutex);
if (!this->paused && outbuf.size()) {
type = send_audio_type;
if (outbuf[0].packet.size() == 2 && (*((uint16_t*)(outbuf[0].packet.data()))) == AUDIO_TRACK_MARKER) {
if (outbuf[0].packet.size() == sizeof(uint16_t) && (*((uint16_t*)(outbuf[0].packet.data()))) == AUDIO_TRACK_MARKER) {
outbuf.erase(outbuf.begin());
track_marker_found = true;
if (tracks > 0) {
Expand Down

0 comments on commit c808c67

Please sign in to comment.