Skip to content

Commit

Permalink
WIP USAGE_VOICE_COMMUNICATION also for input-only VOICE
Browse files Browse the repository at this point in the history
  • Loading branch information
Pehrsons committed Jun 19, 2024
1 parent efcd1fd commit efb13e6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/cubeb_aaudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1187,8 +1187,9 @@ aaudio_stream_init_impl(cubeb_stream * stm, lock_guard<mutex> & lock)
// output
cubeb_stream_params out_params;
if (stm->output_stream_params) {
int output_preset = stm->voice_output ? AAUDIO_USAGE_VOICE_COMMUNICATION
: AAUDIO_USAGE_MEDIA;
int output_preset = (stm->voice_output || stm->voice_input)
? AAUDIO_USAGE_VOICE_COMMUNICATION
: AAUDIO_USAGE_MEDIA;
WRAP(AAudioStreamBuilder_setUsage)(sb, output_preset);
WRAP(AAudioStreamBuilder_setDirection)(sb, AAUDIO_DIRECTION_OUTPUT);
WRAP(AAudioStreamBuilder_setDataCallback)(sb, out_data_callback, stm);
Expand Down

0 comments on commit efb13e6

Please sign in to comment.