-
-
Notifications
You must be signed in to change notification settings - Fork 238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add audio streaming support for generic PCM devices. #209
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,8 +53,21 @@ us_config_s *us_config_init(const char *config_dir_path) { | |
} | ||
if ((config->audio_dev_name = _get_value(jcfg, "audio", "device")) != NULL) { | ||
if ((config->tc358743_dev_path = _get_value(jcfg, "audio", "tc358743")) == NULL) { | ||
US_JLOG_INFO("config", "Missing config value: audio.tc358743"); | ||
goto error; | ||
if((config->pcm_path = _get_value(jcfg, "audio", "pcm_path")) == NULL) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please use just Also the space required after |
||
US_JLOG_INFO("config", "Missing config value: audio.tc358743 OR audio.pcm_path"); | ||
goto error; | ||
} | ||
else { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use |
||
if ((config->pcm_sampling_rate = _get_value(jcfg, "audio", "pcm_sampling_rate")) == NULL) { | ||
config->pcm_sampling_rate = "44100"; | ||
} | ||
US_JLOG_INFO("config", "PCM sample rate set to %sHz", config->pcm_sampling_rate); | ||
|
||
if ((config->pcm_channels = _get_value(jcfg, "audio", "pcm_channels")) == NULL) { | ||
config->pcm_channels = "1"; | ||
} | ||
US_JLOG_INFO("config", "Number of PCM channels set to %s", config->pcm_channels); | ||
} | ||
} | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,6 +39,9 @@ typedef struct { | |
|
||
char *audio_dev_name; | ||
char *tc358743_dev_path; | ||
char *pcm_path; | ||
char *pcm_sampling_rate; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why |
||
char *pcm_channels; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here |
||
} us_config_s; | ||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also fix
numbre -> number
?