-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Bluetooth: BAP: Shell: Minor refactor of LC3 encoder #68810
Bluetooth: BAP: Shell: Minor refactor of LC3 encoder #68810
Conversation
This commit renames a few variables and changes the type and adds some additional checks. It moves stream specific data to the shell stream struct, but still keeps the global values that were used to initialize the LC3 encoder The purpose of this is to better allow for a future LC3 decoder without any clashes in names or the like. Signed-off-by: Emil Gydesen <[email protected]>
2c58152
to
f83add6
Compare
return false; | ||
} | ||
|
||
err = bt_bap_ep_get_info(bap_stream->ep, &info); | ||
if (err != 0) { | ||
bap_stream = &sh_stream->stream.bap_stream; |
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.
We are guaranteed that bap_stream is non-NULL since the unicast_stream gets initialised in the function cmd_init and so we do not need to check for NULL.
Is that correct?
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.
No: We are guaranteed that bap_stream
is non NULL because it's the address of a field :) (Notice the &
)
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.
QUICK-ACK
This commit renames a few variables and changes the type and adds some additional checks.
It moves stream specific data to the shell stream
struct, but still keeps the global values that were used to initialize the LC3 encoder
The purpose of this is to better allow for a future LC3 decoder without any clashes in names or the like.