SFML community forums

General => Feature requests => Topic started by: nitram_cero on May 13, 2009, 12:04:36 am

Title: A way of knowing when alGenSources failed.
Post by: nitram_cero on May 13, 2009, 12:04:36 am
As this is the only way to know the limit of sound sources in OpenAL as far as I know.

A Sound::GetLimit() or GetMaxSounds() static would be nice, but there is no nice way to do it.
Maybe getting as much sources as possible, , and after they fail or not, free them, keeping the count.
(This should be capped to a realistic number like 128 and 256 for OpenAL implementations that do not impose a limit).

At least a Sound::IsOk()/IsValid() (non-static).

Avoiding the errors on cout/cerr that say alGenSources failed will be nice (at least not for the first failure)

It's crucial to make a good sound priority manager which has to get the most sounds possible.

Thanks
-Martín

EDIT: ditch this. I'm rewriting sf::Sound as "ManagedSound" and making a manager with direct calls to OpenAL. Thanks