Re: [AD] make al_create_voice not fail? |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Tue, 2009-08-11 at 12:17 +1000, Peter Wang wrote:
> I think it's expecting al_create_voice to make a best effort to create
> a voice with the suggested parameters, as you say:
>
> > I think better semantics would be for the function to never fail because
> > of a wrong format and instead simply return a voice with supported
> > parameters. (It would still fail if no more voices are available of
> > course.) The user can then always check the values for the actual
> > values, as the documentation already suggests.
>
> I agree. Not sure what purpose the al_create_voice parameters serve
> though, but maybe it gives the sound driver a starting point?
>
I just changed the documentation to say the parameters are a "hint".
Looking briefly at the alsa driver I'm not so sure the implementation
agrees - but from now on if it fails just because it tries to exactly
match the parameters it simply will be a bug and should be fixed.
--
Elias Pschernig <elias@xxxxxxxxxx>