Where the code initially came from
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using OpenTK;
using OpenTK.Audio.OpenAL;
namespace OpenTK_OpenAL
{
class Program
{
static unsafe void Main(string[] args)
{
IntPtr device = Alc.OpenDevice(null);
ContextHandle context = Alc.CreateContext(device, (int*)null);
Alc.MakeContextCurrent(context);
string version = AL.Get(ALGetString.Version);
string vendor = AL.Get(ALGetString.Vendor);
string renderer = AL.Get(ALGetString.Renderer);
Console.WriteLine(version);
Console.WriteLine(vendor);
Console.WriteLine(renderer);
Console.ReadKey();
}
}
}
我正在查看上面的链接并编写了一个程序,但程序不起作用。我可以得到一个为什么这不起作用的建议吗?代码的最开头有一个例外,IntPtr device = Alc.OpenDevice(null);
。