File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -117,12 +117,22 @@ where
117117 let sample_rate = u32:: try_from ( params. sample_rate )
118118 . ok ( )
119119 . filter ( |& sample_rate| sample_rate <= PA_RATE_MAX )
120- . ok_or_else ( || "sample rate exceeds maximum value" . to_owned ( ) ) ?;
120+ . ok_or_else ( || {
121+ format ! (
122+ "sample rate {} exceeds maximum allowed {}" ,
123+ params. sample_rate, PA_RATE_MAX ,
124+ )
125+ } ) ?;
121126
122127 let channels_count = u8:: try_from ( params. channels_count )
123128 . ok ( )
124129 . filter ( |& channels_count| channels_count <= PA_CHANNELS_MAX )
125- . ok_or_else ( || "channels count exceeds maximum value" . to_owned ( ) ) ?;
130+ . ok_or_else ( || {
131+ format ! (
132+ "channels count {} exceeds maximum allowed {}" ,
133+ params. channels_count, PA_CHANNELS_MAX ,
134+ )
135+ } ) ?;
126136
127137 let spec = pa_sample_spec {
128138 format : PA_SAMPLE_FLOAT32LE ,
You can’t perform that action at this time.
0 commit comments