Bug 1373475: Remove panic from pulse_format_to_cubeb_format. r=kinetik

Remove left-over panic! from this function and return default values
of F32NE, just as cubeb_pulse.c does.

MozReview-Commit-ID: 5MgIOSaexF2

--HG--
extra : rebase_source : b1159b09c97df8a41811a85cb0f1674062d5cd92
This commit is contained in:
Dan Glastonbury 2017-06-16 11:15:48 +10:00
parent 2cda9fd79c
commit 79484d5aa4

View File

@ -566,9 +566,8 @@ fn pulse_format_to_cubeb_format(format: pa_sample_format_t) -> cubeb::DeviceFmt
PA_SAMPLE_S16BE => cubeb::DEVICE_FMT_S16BE,
PA_SAMPLE_FLOAT32LE => cubeb::DEVICE_FMT_F32LE,
PA_SAMPLE_FLOAT32BE => cubeb::DEVICE_FMT_F32BE,
_ => {
panic!("Invalid format");
},
// Unsupported format, return F32NE
_ => cubeb::CUBEB_FMT_F32NE,
}
}