cellMic: simplify BE translation loop
We are looping over each channel of each sample without gaps. So we can just make it a single loop.
This commit is contained in:
@@ -602,15 +602,9 @@ void microphone_device::get_data(const u32 num_samples)
|
|||||||
ensure(bufsize <= temp_buf.size());
|
ensure(bufsize <= temp_buf.size());
|
||||||
|
|
||||||
// BE Translation
|
// BE Translation
|
||||||
for (u32 index = 0; index < num_samples; index++)
|
for (u32 index = 0; index < bufsize; index += channel_size)
|
||||||
{
|
{
|
||||||
const u32 sample_pos = index * sample_size;
|
microphone_device::variable_byteswap<channel_size>(buf.data() + index, tmp_ptr + index);
|
||||||
|
|
||||||
for (u32 indchan = 0; indchan < num_channels; indchan++)
|
|
||||||
{
|
|
||||||
const u32 curindex = sample_pos + indchan * channel_size;
|
|
||||||
microphone_device::variable_byteswap<channel_size>(buf.data() + curindex, tmp_ptr + curindex);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user