mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 19:45:20 +00:00
cellMic: only allocate temp_buf if needed
This commit is contained in:
parent
a5bd22b0cf
commit
9505f8116b
1 changed files with 5 additions and 1 deletions
|
@ -430,7 +430,6 @@ error_code microphone_device::open_microphone(const u8 type, const u32 dsp_r, co
|
|||
|
||||
devices[0].device = device;
|
||||
devices[0].buf.resize(inbuf_size, 0);
|
||||
temp_buf.resize(inbuf_size, 0);
|
||||
|
||||
if (device_type == microphone_handler::singstar && devices.size() >= 2)
|
||||
{
|
||||
|
@ -449,6 +448,11 @@ error_code microphone_device::open_microphone(const u8 type, const u32 dsp_r, co
|
|||
}
|
||||
}
|
||||
|
||||
if (device_type != microphone_handler::real_singstar)
|
||||
{
|
||||
temp_buf.resize(inbuf_size, 0);
|
||||
}
|
||||
|
||||
sample_size = (bit_resolution / 8) * num_channels;
|
||||
|
||||
mic_opened = true;
|
||||
|
|
Loading…
Add table
Reference in a new issue