Add more detailed message to panic
When samples format is not supported, cpal panics with "not yet implemented" message, which is not useful in bug reports. This adds samples format to the message. Signed-off-by: Mariusz Ceier <mceier+cpal@gmail.com>
This commit is contained in:
parent
b1216f5e12
commit
55eec8567e
|
@ -41,7 +41,7 @@ impl Voice {
|
|||
pub fn get_samples_format(&self) -> ::SampleFormat {
|
||||
match self.bits_per_sample {
|
||||
16 => ::SampleFormat::I16,
|
||||
_ => unimplemented!(),
|
||||
_ => panic!("{}-bit format not yet supported", self.bits_per_sample),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue