[openal] some beginner questions

Victorious dtvictorious at gmail.com
Wed May 13 23:50:08 EDT 2015

Great to hear about the HRTF. I'll probably switch from the openal-mob fork to the latest openal-soft.

Not sure, but i don't think you can directly initialize it like that. I just switched the arrays to being initialized normally inside the constructor body.

alure\src\source.cpp(371): error C2057: expected constant expression

if(processed > 0)
            ALuint bufs[processed]; // errored line
            alSourceUnqueueBuffers(mId, processed, bufs);

Even if you were able to initialize a variable size array like that, won't this just pass an array of uninitialized/invalid buffer IDs? If so, where are the list of processed buffers stored? Line 397 also has this as well.

source\alure\src\decoders\sndfile1.cpp(19): error 2666: 'std::fpos<_Mbstatet>::operator !=' : 2 overloads have similar conversions

-----Original Message-----
From: openal [mailto:openal-bounces at openal.org] On Behalf Of Chris Robinson
Sent: Thursday, May 14, 2015 4:39 AM
To: openal mailing list
Subject: Re: [openal] some beginner questions

On 05/09/2015 09:08 PM, Victorious wrote:
> Will HRTF be enabled automatically if the presence of a suitable .mhr 
> is detected in the current directory?

Yes, if the device is configured as headphones. More specifically, if PKEY_AudioEndpoint_FormFactor gives back 'Headphones' in mmdevapi, or IDirectSound::GetSpeakerConfig gives back DSSPEAKER_HEADPHONE in dsound.

> I'm having some trouble with building allure. I've used cmake and it 
> has detected the presence of PhysicsFS and libsndfile. When I try 
> building the resulting visual studio solution, I get the following
> warning/errors: ...
> Error	26	error C2536: 'alure::Vector3::alure::Vector3::mValue' :
> cannot specify explicit initializer for arrays
> D:\source\alure\include\AL\alure2.h	70	1	alure2

This looks like it's having trouble with C++11. Or my C++11 is wrong. 
The code in question is:

class Vector3 {
     ALfloat mValue[3];
     Vector3(ALfloat val) : mValue{val, val, val}
     { }

As far as I know, this is a valid way to initialize arrays in C++11. Or isn't it?
openal mailing list
openal at openal.org

More information about the openal mailing list