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();
}
}
}
I am looking at the link above and wrote a program, but the program does not work. Can I get a suggestion of why this doesn't work? There is an exception at the very beginning of the code, IntPtr device = Alc.OpenDevice(null);
.