| Index: media/audio/audio_util.cc
|
| ===================================================================
|
| --- media/audio/audio_util.cc (revision 70339)
|
| +++ media/audio/audio_util.cc (working copy)
|
| @@ -93,7 +93,8 @@
|
| int bytes_per_sample,
|
| float volume) {
|
| DCHECK(buf);
|
| - DCHECK(volume >= 0.0f && volume <= 1.0f);
|
| + if (volume < 0.0f || volume > 1.0f)
|
| + return false;
|
| if (volume == 1.0f) {
|
| return true;
|
| } else if (volume == 0.0f) {
|
| @@ -129,7 +130,8 @@
|
| int bytes_per_sample,
|
| float volume) {
|
| DCHECK(buf);
|
| - DCHECK(volume >= 0.0f && volume <= 1.0f);
|
| + if (volume < 0.0f || volume > 1.0f)
|
| + return false;
|
| if (channels > 2 && channels <= 8 && bytes_per_sample > 0) {
|
| int sample_count = buflen / (channels * bytes_per_sample);
|
| if (bytes_per_sample == 1) {
|
|
|