cellMic: only allocate temp_buf if needed
This commit is contained in:
@@ -430,7 +430,6 @@ error_code microphone_device::open_microphone(const u8 type, const u32 dsp_r, co
|
|||||||
|
|
||||||
devices[0].device = device;
|
devices[0].device = device;
|
||||||
devices[0].buf.resize(inbuf_size, 0);
|
devices[0].buf.resize(inbuf_size, 0);
|
||||||
temp_buf.resize(inbuf_size, 0);
|
|
||||||
|
|
||||||
if (device_type == microphone_handler::singstar && devices.size() >= 2)
|
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;
|
sample_size = (bit_resolution / 8) * num_channels;
|
||||||
|
|
||||||
mic_opened = true;
|
mic_opened = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user