Skip to content

Commit

Permalink
Fix 64-bit incompatibility in VoiceRecorder.
Browse files Browse the repository at this point in the history
On 64-bit Windows, DWORD_PTR and DWORD are different sizes, and this
causes an error with GCC 12 on MSYS2 Mingw64 on Windows 10.
  • Loading branch information
Quipyowert2 committed Apr 10, 2023
1 parent 082058b commit dfe45c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/VoiceRecorder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ int record(void *pointer)
unsigned sourceId = 0;

// Open device
MMRESULT openResult = waveInOpen(&waveIn, sourceId, &waveFormat, (DWORD)event, 0, CALLBACK_EVENT);
MMRESULT openResult = waveInOpen(&waveIn, sourceId, &waveFormat, (DWORD_PTR)event, 0, CALLBACK_EVENT);
if (openResult != MMSYSERR_NOERROR)
break;

Expand Down

0 comments on commit dfe45c5

Please sign in to comment.