You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "mu578 (via GitHub)" <gi...@apache.org> on 2023/07/16 02:02:56 UTC

[GitHub] [nuttx] mu578 commented on pull request #9838: driver/audio: remove unnecessary switch in switch

mu578 commented on PR #9838:
URL: https://github.com/apache/nuttx/pull/9838#issuecomment-1636948279

   A little code styling trick (works with colons two doesn't cost and you immediately regain human readability)
   
   ```c
   caps->ac_controls.hw[0] = (
   	  AUDIO_SAMP_RATE_8K
   	| AUDIO_SAMP_RATE_11K
   	| AUDIO_SAMP_RATE_16K
   	| AUDIO_SAMP_RATE_22K
   	| AUDIO_SAMP_RATE_32K
   	| AUDIO_SAMP_RATE_44K
   	| AUDIO_SAMP_RATE_48K
   	| AUDIO_SAMP_RATE_96K
   	| AUDIO_SAMP_RATE_128K
   	| UDIO_SAMP_RATE_160K
   	| AUDIO_SAMP_RATE_172K
   	| AUDIO_SAMP_RATE_192K
   );
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org