1 Mar 2008 01:56
Re: ALSA C++ API updated for 1.0.16
Lasse Kärkkäinen <tronic <at> trn.iki.fi>
2008-03-01 00:56:31 GMT
2008-03-01 00:56:31 GMT
Clemens wrote:
> I'm just objecting to the fact that the function name and ALSA's error
> string are combined into a string that cannot easily be parsed later.
As Aldrin pointed out, it is not meant to be parsed. I have now provided
separate functions for accessing the function names directly.
> I'd like to have only the snd_strerror() result as the message. In this
> case, the function name has to be stored separately if it is needed.
"alsa::pcm::pcm: snd_pcm_open failed: No such file or directory" is
useful for debugging, "No such file or directory" is not. Therefore, I
don't see why you want only snd_strerror in that message.
> While playback will be used more often, I think the difference between
> playback and capture is so big that we cannot make one of them the
> default.
I have removed the default arguments, as you requested.
>>>> hw_config(snd_pcm_t* pcm): pcm(pcm) {
>>>> try { current(); } catch (std::runtime_error&) { any(); }
>>> I don't like using exceptions when there's nothing wrong. Besides,
>>> getting the current parameters may fail due to other errors (like device
>>> unplugged).
>> It seems like a sensible fallback, anyway. The other option would be to
>> load any() settings always and have the user call current(), if he wants
>> those instead. Would you find this preferable?
>
> My preference would be that the user has to indicate whether he wants
(Continue reading)
RSS Feed