Open
Description
I suggest to review this module with pair programming.
IMHO the rec_play->state
should be a simple variable that can have the following values:
#define SDS_RECPLAY_STATE_INACTIVE 0 // data stream unused
#define SDS_RECPLAY_STATE_OPENING 1 // open function is processed
#define SDS_RECPLAY_STATE_PLAY 2 // data stream is in play (read) mode
#define SDS_RECPLAY_STATE_REC 3 // data stream is in recording (write) mode
#define SDS_RECPLAY_CLOSING 4 // close function is processed
Using this states should make:
- simplify the overall code (it can be only one value, not multiple flags).
stream_type
obsolete (such a variable should be named mode for consistency).
rec_play->flags
seems to be another state (somehow duplicates). It could be perhaps mapped to the state, i.e. by using
#define SDS_RECPLAY_STATE_EOS 5 // data stream read end of stream in play (read) mode
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Backlog