hiyohiyo / CrystalDiskInfo

CrystalDiskInfo
https://github.com/hiyohiyo/CrystalDiskInfo
MIT License
1.59k stars 177 forks source link

Crash when clicking character to play sound #246

Closed DogTorrent closed 4 months ago

DogTorrent commented 4 months ago

I pull down this repo and change line 2023 in DiskInfoDlg.cpp:

// Open
- mop.lpstrDeviceType = _T("MPEGVideo");
+ mop.lpstrDeviceType = _T("WaveAudio");
mop.lpstrElementName = alertSoundPath;
error = mciSendCommandW(NULL, MCI_OPEN, MCI_OPEN_TYPE | MCI_OPEN_ELEMENT, reinterpret_cast<DWORD_PTR>(&mop));

then it works

DogTorrent commented 4 months ago

I am not familiar with MCI, and I don't know what this modification means. I just got related answers from stackoverflow(here):

Just the same. Now, it looks like mciqtz32.dll uses the installed DirectShow filters to open the file. So maybe there is an issue with any of your MP3 DirectShow codec. But that's quite difficult to say... – rodrigo Aug 22, 2011 at 10:54

So maybe this issue was caused by me installing some DirectShow filters(k-lite codec pack and XySubFilter)?

DogTorrent commented 4 months ago

ohh, I uninstalled and reinstalled XySubFilter with libass, and then everything worked properly...