Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
toxieainc committed Jun 28, 2024
2 parents 73e77b4 + cb9dce5 commit b8f3978
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/altsound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,35 +55,35 @@ void altsound_preprocess_commands(int cmd)
for (int i = 0; i < ALT_MAX_CMDS; ++i)
g_cmdData.cmd_buffer[i] = ~0;

*g_cmdData.cmd_counter = 0;
*g_cmdData.cmd_filter = 1;
g_cmdData.cmd_counter = 0;
g_cmdData.cmd_filter = 1;
}
else
if ((g_cmdData.cmd_buffer[3] == 0x55) && (g_cmdData.cmd_buffer[2] == 0xC2)) // DCS software major version number
{
for (int i = 0; i < ALT_MAX_CMDS; ++i)
g_cmdData.cmd_buffer[i] = ~0;

*g_cmdData.cmd_counter = 0;
*g_cmdData.cmd_filter = 1;
g_cmdData.cmd_counter = 0;
g_cmdData.cmd_filter = 1;
}
else
if ((g_cmdData.cmd_buffer[3] == 0x55) && (g_cmdData.cmd_buffer[2] == 0xC3)) // DCS software minor version number
{
for (int i = 0; i < ALT_MAX_CMDS; ++i)
g_cmdData.cmd_buffer[i] = ~0;

*g_cmdData.cmd_counter = 0;
*g_cmdData.cmd_filter = 1;
g_cmdData.cmd_counter = 0;
g_cmdData.cmd_filter = 1;
}
else
if ((g_cmdData.cmd_buffer[3] == 0x55) && (g_cmdData.cmd_buffer[2] >= 0xBA) && (g_cmdData.cmd_buffer[2] <= 0xC1) && (g_cmdData.cmd_buffer[1] == (g_cmdData.cmd_buffer[0] ^ 0xFF))) // mystery command, see http://mjrnet.org/pinscape/dcsref/DCS_format_reference.html#SpecialCommands
{
for (int i = 0; i < ALT_MAX_CMDS; ++i)
g_cmdData.cmd_buffer[i] = ~0;

*g_cmdData.cmd_counter = 0;
*g_cmdData.cmd_filter = 1;
g_cmdData.cmd_counter = 0;
g_cmdData.cmd_filter = 1;
}
else
if (((g_cmdData.cmd_buffer[3] == 0x55) && (g_cmdData.cmd_buffer[2] == 0xAA))) { // change master volume?
Expand Down
1 change: 1 addition & 0 deletions src/altsound_processor_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

#include <iomanip>
#include <chrono>
#include <cfloat>

extern AltsoundLogger alog;
extern StreamArray channel_stream;
Expand Down

0 comments on commit b8f3978

Please sign in to comment.