mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 19:45:20 +00:00
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:
parent
161edbf2f6
commit
6a6cd82070
1 changed files with 2 additions and 8 deletions
|
@ -602,15 +602,9 @@ void microphone_device::get_data(const u32 num_samples)
|
|||
ensure(bufsize <= temp_buf.size());
|
||||
|
||||
// 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;
|
||||
|
||||
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);
|
||||
}
|
||||
microphone_device::variable_byteswap<channel_size>(buf.data() + index, tmp_ptr + index);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue