You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2024/10/16 07:40:42 UTC
(nuttx) 01/02: nuttx/audio: increase bits of samplerate in struct audio_info_s.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 42e416d05476f7ea2d5d95ed7a2cfaa75480e6a8
Author: wurui3 <wu...@xiaomi.com>
AuthorDate: Thu Nov 23 11:15:48 2023 +0800
nuttx/audio: increase bits of samplerate in struct audio_info_s.
Current 8 bits of uint8_t cannot represent sample rate bigger than
255,change uint8_t to uint32_t to expand sample rate range.
Signed-off-by: wurui3 <wu...@xiaomi.com>
---
include/nuttx/audio/audio.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/nuttx/audio/audio.h b/include/nuttx/audio/audio.h
index d6783dbb6c..1d1ae1fe3f 100644
--- a/include/nuttx/audio/audio.h
+++ b/include/nuttx/audio/audio.h
@@ -436,10 +436,10 @@ struct audio_caps_desc_s
struct audio_info_s
{
- uint8_t samplerate; /* Sample Rate of the audio data */
- uint8_t channels; /* Number of channels (1, 2, 5, 7) */
- uint8_t format; /* Audio data format */
- uint8_t subformat; /* Audio subformat
+ uint32_t samplerate; /* Sample Rate of the audio data */
+ uint8_t channels; /* Number of channels (1, 2, 5, 7) */
+ uint8_t format; /* Audio data format */
+ uint8_t subformat; /* Audio subformat
* (maybe should be combined with format?
*/
};