[Openal] Re: OpenalSoft 1.7.411 & malformed version number on ppc
G5 and i386 macbook ok
Chris Robinson
chris.kcat at gmail.com
Tue Apr 7 19:03:31 PDT 2009
On Tuesday 07 April 2009 5:40:10 pm Manolache Adrian wrote:
> After each compile i tried to run openal-info but twice i received:
> "ALC error Invalid Context occured"
You may need to set a specific PortAudio device in ~/.alsoftrc (or
/etc/openal/alsoft.conf for system-wide). I noticed on my system, trying to
pick the default PA device would give you an invalid device, but setting a
specific one would work. Try adding this to the file:
[port]
device = 0
If that doesn't work, you may need to find the right device. Unfortunately,
PortAudio doesn't work well with device strings, so it uses index numbers..
and it doesn't seem to come with a util that will list them for you.
You can make a small program that lists them, though:
int i, numDevices = Pa_GetDeviceCount();
for(i = 0;i < numDevices;i++)
{
const PaDeviceInfo *deviceInfo = Pa_GetDeviceInfo(i);
printf("%i - %s\n", i, deviceInfo->name);
}
> I then ran my own program and tried to enumerate the devices like so:
...
> The output looked like this:
> Device: Wave File Writer
>
> I'm wondering what am i doing wrong, portaudio should have been present in
> there, right? What am i missing?
The code looks a little odd. Try something like this:
char *device = (char*)alcGetString(NULL, ALC_DEFAULT_DEVICE_SPECIFIER);
char *deviceS = (char*)alcGetString(NULL, ALC_DEVICE_SPECIFIER);
printf("Default device: %s\n", device);
printf("Devices:\n");
while(*deviceS)
{
printf(" %s\n", deviceS);
deviceS += strlen(deviceS)+1;
}
More information about the Openal
mailing list