Backed out changeset 6cfa5e25f30c (bug 1270062) for build bustage on Windows x64. r=bustage on a CLOSED TREE

This commit is contained in:
Sebastian Hengst 2016-05-04 19:29:13 +02:00
parent 0769ad1c3e
commit 364419d47c
2 changed files with 9 additions and 7 deletions

View File

@ -5,4 +5,4 @@ Makefile.in build files for the Mozilla build system.
The cubeb git repository is: git://github.com/kinetiknz/cubeb.git
The git commit ID used was 95b115e10e6280b934fc7d09a2c801055a2207f9.
The git commit ID used was 17e3048d0afa1152776fb1867cdb61c49fae69e4.

View File

@ -587,7 +587,9 @@ bool get_input_buffer(cubeb_stream * stm)
/* Get input packets until we have captured enough frames, and put them in a
* contiguous buffer. */
uint32_t offset = 0;
while (offset != total_available_input) {
uint32_t input_channel_count = stm->input_mix_params.channels;
while (offset != total_available_input * input_channel_count &&
total_available_input) {
hr = stm->capture_client->GetNextPacketSize(&next);
if (FAILED(hr)) {
LOG("cannot get next packet size: %x\n", hr);
@ -620,7 +622,7 @@ bool get_input_buffer(cubeb_stream * stm)
assert(ok);
upmix(reinterpret_cast<float*>(input_packet), packet_size,
stm->linear_input_buffer.data() + stm->linear_input_buffer.length(),
stm->input_mix_params.channels,
input_channel_count,
stm->input_stream_params.channels);
stm->linear_input_buffer.set_length(stm->linear_input_buffer.length() + packet_size * stm->input_stream_params.channels);
} else if (should_downmix(stm->input_mix_params, stm->input_stream_params)) {
@ -629,7 +631,7 @@ bool get_input_buffer(cubeb_stream * stm)
assert(ok);
downmix(reinterpret_cast<float*>(input_packet), packet_size,
stm->linear_input_buffer.data() + stm->linear_input_buffer.length(),
stm->input_mix_params.channels,
input_channel_count,
stm->input_stream_params.channels);
stm->linear_input_buffer.set_length(stm->linear_input_buffer.length() + packet_size * stm->input_stream_params.channels);
} else {
@ -642,11 +644,11 @@ bool get_input_buffer(cubeb_stream * stm)
LOG("FAILED to release intput buffer");
return false;
}
offset += packet_size;
offset += packet_size * input_channel_count;
}
assert(stm->linear_input_buffer.length() >= total_available_input &&
offset == total_available_input);
offset == total_available_input * input_channel_count);
return true;
}
@ -675,7 +677,7 @@ bool get_output_buffer(cubeb_stream * stm, size_t max_frames, float *& buffer, s
return true;
}
frame_count = std::min(max_frames, stm->output_buffer_frame_count - padding_out);
frame_count = std::min<size_t>(max_frames, stm->output_buffer_frame_count - padding_out);
BYTE * output_buffer;
hr = stm->render_client->GetBuffer(frame_count, &output_buffer);