Can an OpenAL source generated by alGenSources() ever be 0?
Because I would like to store NULL as source whenever the source has stopped playing.
It is stored as an ALuint.
I couldn't find it in the Programmers guide.
Can an OpenAL source generated by alGenSources() ever be 0?
Because I would like to store NULL as source whenever the source has stopped playing.
It is stored as an ALuint.
I couldn't find it in the Programmers guide.
Copyright © 2021 Jogjafile Inc.
Unfortunately, you cannot rely on
0being reserved as invalid, as it is allowed id by specs (up to implementation to decide).According to OpenAL 1.1 specs:
From the other side, if you don't care about other OpenAL implementations, OpenAL soft (as for 1.17) internally returns values starting from
1, though this should be considered as implementation detail: