Skip to content

Commit

Permalink
Log stream state names in aaudio_stream_stop_locked
Browse files Browse the repository at this point in the history
  • Loading branch information
Pehrsons committed Jan 8, 2025
1 parent 441e45a commit 76f4bcf
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/cubeb_aaudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1640,9 +1640,15 @@ aaudio_stream_stop_locked(cubeb_stream * stm, lock_guard<mutex> & lock)
assert(stm && stm->in_use.load());

stream_state state = stm->state.load();
int istate = stm->istream ? WRAP(AAudioStream_getState)(stm->istream) : 0;
int ostate = stm->ostream ? WRAP(AAudioStream_getState)(stm->ostream) : 0;
LOG("STOPPING stream %p: %d (%d %d)", (void *)stm, state, istate, ostate);
aaudio_stream_state_t istate = stm->istream
? WRAP(AAudioStream_getState)(stm->istream)
: AAUDIO_STREAM_STATE_UNINITIALIZED;
aaudio_stream_state_t ostate = stm->ostream
? WRAP(AAudioStream_getState)(stm->ostream)
: AAUDIO_STREAM_STATE_UNINITIALIZED;
LOG("STOPPING stream %p: %d (in: %s out: %s)", (void *)stm, state,
cubeb_AAudio_convertStreamStateToText(istate),
cubeb_AAudio_convertStreamStateToText(ostate));

switch (state) {
case stream_state::STOPPED:
Expand Down

0 comments on commit 76f4bcf

Please sign in to comment.