私はSDL_mixer を使用してオーディオに関するこのチュートリアルを行っていましたが、すべてうまくいきました。
その後、実験、遊び、探求を通じて学ぶことにしたので、非常によく似たプログラムを作成しました。2 つのサウンド チャンネルがあり、ビデオ ゲームの音楽を再生し、ボタンを押してゲームの効果音を再生することができます。
それから私はただ馬鹿げてプログラムをテストするために、楽しみながらボタン連打を始めました。複数のボタンを非常にすばやくボタン連打し始め、おそらく 5 秒ほど押し続けた後、プログラムが予期せず終了しました。
その日から 2 か月ほど前から、SDL_mixer を使用しているコンピューターで何も実行できませんでした。SDL_mixer で新しいプロジェクトを作成しようとしました。SDL と SDL_mixer をすべて再ダウンロードしました。さらに、sdl フォーラムでこの質問をしました。
コンピューター全体を再フォーマットして、再び機能させるところまで来ていますが、これは問題ありません。拡張ライブラリは、特にこれが後でプログラムをダウンロードして使用するエンド ユーザーに渡される可能性がある問題である場合は、再フォーマットを強制するべきではありません。
Windows 7 64 ビットを使用しています。Microsoft Visual Studio 2012 プロフェッショナル; C++; および SDL 1.x
また、誰かが何が問題なのかを知っている場合、どうすればこれを修正し、再発を防ぎ、ユーザーのコンピューターに問題を引き起こさないようにサウンドを安全に使用できますか?
ミキサーの初期化に使用した行は次のとおりです。
//Initialize SDL_mixer
if( Mix_OpenAudio( 22050, MIX_DEFAULT_FORMAT, 2, 4096 ) == -1 )
{
return false;
}
プログラムを起動した後、デバッガーによって次の行が吐き出され、すぐに閉じます。
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Users\Rayne\Documents\Visual Studio 11\Projects\SDL_Tutorial11\Debug\SDL_Tutorial11.exe'. Symbols loaded.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\KernelBase.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Users\Rayne\Documents\Visual Studio 11\Projects\SDL_Tutorial11\Debug\SDL.dll'. Module was built without symbols.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\advapi32.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcrt.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sechost.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sspicli.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cryptbase.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\gdi32.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\user32.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\lpk.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\usp10.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\winmm.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Users\Rayne\Documents\Visual Studio 11\Projects\SDL_Tutorial11\Debug\SDL_image.dll'. Module was built without symbols.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Users\Rayne\Documents\Visual Studio 11\Projects\SDL_Tutorial11\Debug\SDL_ttf.dll'. Module was built without symbols.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Users\Rayne\Documents\Visual Studio 11\Projects\SDL_Tutorial11\Debug\libfreetype-6.dll'. Module was built without symbols.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Users\Rayne\Documents\Visual Studio 11\Projects\SDL_Tutorial11\Debug\zlib1.dll'. Module was built without symbols.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Users\Rayne\Documents\Visual Studio 11\Projects\SDL_Tutorial11\Debug\SDL_mixer.dll'. Module was built without symbols.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcp110.dll'. Symbols loaded.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcr110.dll'. Symbols loaded.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\imm32.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msctf.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ddraw.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\dciman32.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\setupapi.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cfgmgr32.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\oleaut32.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ole32.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\devobj.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\dwmapi.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\ddraw.dll'
'SDL_Tutorial11.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\dwmapi.dll'
'SDL_Tutorial11.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\setupapi.dll'
'SDL_Tutorial11.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\devobj.dll'
'SDL_Tutorial11.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\oleaut32.dll'
'SDL_Tutorial11.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\ole32.dll'
'SDL_Tutorial11.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\cfgmgr32.dll'
'SDL_Tutorial11.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\dciman32.dll'
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\uxtheme.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\dwmapi.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\KBDUS.DLL'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\KBDUS.DLL'
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\KBDUS.DLL'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\KBDUS.DLL'
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\dsound.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ole32.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\powrprof.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\setupapi.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cfgmgr32.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\oleaut32.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\devobj.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\dinput.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\hid.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\wintrust.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\crypt32.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msasn1.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ole32.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\ole32.dll'
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ole32.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\ole32.dll'
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\clbcatq.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\MMDevAPI.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\propsys.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\shlwapi.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\AudioSes.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Users\Rayne\Documents\Visual Studio 11\Projects\SDL_Tutorial11\Debug\libmikmod-2.dll'. Module was built without symbols.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\wdmaud.drv'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ksuser.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\avrt.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msacm32.drv'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msacm32.dll'. Cannot find or open the PDB file.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Windows\SysWOW64\midimap.dll'. Cannot find or open the PDB file.
The thread 0x5b8 has exited with code 0 (0x0).
The thread 0x1d2c has exited with code 0 (0x0).
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Users\Rayne\Documents\Visual Studio 11\Projects\SDL_Tutorial11\Debug\libpng15-15.dll'. Module was built without symbols.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Users\Rayne\Documents\Visual Studio 11\Projects\SDL_Tutorial11\Debug\libvorbisfile-3.dll'. Module was built without symbols.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Users\Rayne\Documents\Visual Studio 11\Projects\SDL_Tutorial11\Debug\libvorbis-0.dll'. Module was built without symbols.
'SDL_Tutorial11.exe' (Win32): Loaded 'C:\Users\Rayne\Documents\Visual Studio 11\Projects\SDL_Tutorial11\Debug\libogg-0.dll'. Module was built without symbols.
The thread 0x1a1c has exited with code 0 (0x0).
The thread 0x1fbc has exited with code 0 (0x0).
The thread 0x3f8 has exited with code 0 (0x0).
The thread 0x584 has exited with code 0 (0x0).
The thread 0xa98 has exited with code 0 (0x0).
The thread 0x182c has exited with code 1 (0x1).
The thread 0x1d1c has exited with code 1 (0x1).
The thread 0x1278 has exited with code 1 (0x1).
The thread 0x1d28 has exited with code 1 (0x1).
The thread 0x1ca0 has exited with code 1 (0x1).
The thread 0x1844 has exited with code 1 (0x1).
The thread 0x1340 has exited with code 1 (0x1).
The thread 0x6e8 has exited with code 1 (0x1).
The thread 0x2008 has exited with code 1 (0x1).
The program '[4852] SDL_Tutorial11.exe' has exited with code 1 (0x1).
PS 各行の前に 4 つのスペースを手動でコピー アンド ペーストすることなく、コードの大きなセクションを示す簡単な方法はありますか? 時間がかかりました._.;