C言語 OpenALでのwaveファイルの再生
Open AL を使ったwaveファイルをただ再生するプログラムを作成したいのですが、コンパイル方法がわからず困っています。一応include pathの設定はやっているのですがそれでも動きません。どなたか解決方法をご存じの方がいらっしゃいましたら、アドバイスを頂けると助かります。
- OS windows11
- 使用ソフト vscode
- コンパイラ Ming 32
質問するのが今回で初めてなので、足りない部分もあると思いますがその都度教えていただければ幸いです。
#include <stdio.h> #include <stdlib.h> #include <al.h> #include <alc.h> #pragma comment(lib, "") #pragma comment(lib, "alut.lib") int main(void) { char *filename = "serf 1.wav"; alureInitDevice(NULL, NULL); ALuint source; alGenSources(1, &source); ALuint buffer = alureCreateBufferFromFile(filename); alSourcei(source, AL_BUFFER, buffer); alSourcePlay(source); return 0; }
~ error ~
C:\Users\81803\list-1> gcc sound.c -o sound
sound.c:3:16: fatal error: al.h: No such file or directory
#include <al.h>
^
compilation terminated.
C:\Users\81803\list-1> gcc sound.c -lm
sound.c:3:16: fatal error: al.h: No such file or directory
#include <al.h>
^
compilation terminated.
あなたの回答
tips
プレビュー