Skip to content

Commit

Permalink
clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
padenot committed Nov 10, 2023
1 parent b32ab34 commit 6f0f147
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/cubeb_aaudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ using namespace std;
X(AAudioStreamBuilder_setFramesPerDataCallback)

// not needed or added later on
// X(AAudioStreamBuilder_setDeviceId) \
// X(AAudioStreamBuilder_setDeviceId) \
// X(AAudioStreamBuilder_setSamplesPerFrame) \
// X(AAudioStream_getSamplesPerFrame) \
// X(AAudioStream_getDeviceId) \
Expand Down Expand Up @@ -1124,7 +1124,8 @@ aaudio_stream_init_impl(cubeb_stream * stm, lock_guard<mutex> & lock)
WRAP(AAudioStreamBuilder_setDataCallback)(sb, out_data_callback, stm);
assert(stm->latency_frames < std::numeric_limits<int32_t>::max());
LOG("Frames per callback set to %d for output", stm->latency_frames);
WRAP(AAudioStreamBuilder_setFramesPerDataCallback)(sb, static_cast<int>(stm->latency_frames));
WRAP(AAudioStreamBuilder_setFramesPerDataCallback)
(sb, static_cast<int32_t>(stm->latency_frames));

int res_err = realize_stream(sb, stm->output_stream_params.get(),
&stm->ostream, &frame_size);
Expand Down Expand Up @@ -1179,14 +1180,16 @@ aaudio_stream_init_impl(cubeb_stream * stm, lock_guard<mutex> & lock)
WRAP(AAudioStreamBuilder_setDataCallback)(sb, in_data_callback, stm);
assert(stm->latency_frames < std::numeric_limits<int32_t>::max());
LOG("Frames per callback set to %d for input", stm->latency_frames);
WRAP(AAudioStreamBuilder_setFramesPerDataCallback) (sb, static_cast<int>(stm->latency_frames));
WRAP(AAudioStreamBuilder_setFramesPerDataCallback)
(sb, static_cast<int32_t>(stm->latency_frames));
int res_err = realize_stream(sb, stm->input_stream_params.get(),
&stm->istream, &frame_size);
if (res_err) {
return res_err;
}

int32_t input_burst_size = WRAP(AAudioStream_getFramesPerBurst)(stm->istream);
int32_t input_burst_size =
WRAP(AAudioStream_getFramesPerBurst)(stm->istream);
LOG("AAudio input burst size: %d", input_burst_size);
// 3 times the burst size seems to be robust.
res = WRAP(AAudioStream_setBufferSizeInFrames)(stm->istream,
Expand Down

0 comments on commit 6f0f147

Please sign in to comment.