当我试图在音频组合中装上音响时,我总是把这一ir错误pop。 I m对SDL来说仍然非常新,我曾尝试过大量清醒战略,但在此,这部守则和错误最终将:
#include <SDL.h>
#include <SDL_image.h>
#include <SDL_mixer.h>
#include <stdio.h>
#include <string>
const int SCREEN_WIDTH = 1500;
const int SCREEN_HEIGHT = 1000;
Mix_Chunk* goku = NULL;
int SDL_main(int argc, char* argv[]) {
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO) < 0)
{
printf("SDL could not initialize! SDL Error: %s
", SDL_GetError());
}
if (Mix_OpenAudio(44100, MIX_DEFAULT_FORMAT, 2, 2048) < 0)
{
printf("SDL_mixer could not initialize! SDL_mixer Error: %s
", Mix_GetError());
}
goku = Mix_LoadWAV("goku.wav");
Mix_PlayChannel(-1, goku, 0);
SDL_Delay(5000);
Mix_FreeChunk(goku);
goku = NULL;
SDL_DestroyWindow(gWindow);
gWindow = NULL;
Mix_Quit();
IMG_Quit();
SDL_Quit();
return 0;
}
The Error:
SDL2.dll无文号
Unhandled exception at 0x7B58290E (SDL2.dll) in TheScorchGame.exe: 0xC0000005: 出入现场0xBE800008。
我试图重载装货单的符号,因为没有发现文号。 现在,我两次把SDL重新talled为一线,并尽一切力量努力使其发挥作用,似乎像Mem_OpenAudio一样是问题。 然而,我看不出有什么错误。