[mythtv] [PATCH] audiooutputalsa.cpp Broken pipe fix

David myth at dgreaves.com
Tue Sep 7 09:56:29 EDT 2004


Isaac Richards wrote:

>>see what it would look like.  This is based on examples I have seen.  I
>>am not a Doxygen expert.
>>    
>>
> I also added a sample Doxygen comment before SetParameters so we could
>
>
>This is exactly what I _don't_ want.  Functions should be documented as to 
>what they do, not wasting space describing what the variables are.  If that's 
>not clear from the type and name, then that needs fixed, not extra 
>documentation added.
>
>Isaac
>_______________________________________________
>  
>
Although this may not be the best function to start with - SetParameters 
seems a reasonably obvious function.

Other than that I'd say David has provided some useful documentation:
He has:
* set out the inputs.
* identified the error code is the ALSA error code, not a Myth one - and 
maybe identified the most likely error return.
* clarified the otherwise undocumented timing units (int can't imply 
milliseconds).

Maybe the first couple of params are redundant

You surely don't want code like this:

 int AudioOutputALSA::SetParameters(snd_pcm_t *handle, snd_pcm_access_t access,
                                    snd_pcm_format_t format, unsigned int channels,
-                                    unsigned int rate, unsigned int buffer_time,
+                                    unsigned int rate, unsigned int buffer_time_in_milliseconds,


David




More information about the mythtv-dev mailing list