Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2203)

Unified Diff: webrtc/voice_engine/file_player.cc

Issue 2791453004: Revert of Supporting 48kHz PCM file. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/voice_engine/file_player.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/voice_engine/file_player.cc
diff --git a/webrtc/voice_engine/file_player.cc b/webrtc/voice_engine/file_player.cc
index 81ba34fa7a7804f5d21a25d7fa298190854377b5..4ee1322e9b9f5a123e968bbd564dd15dcce567e8 100644
--- a/webrtc/voice_engine/file_player.cc
+++ b/webrtc/voice_engine/file_player.cc
@@ -100,7 +100,7 @@
} else if (_codec.plfreq == 44000) {
return 32000;
} else if (_codec.plfreq == 48000) {
- return 48000;
+ return 32000;
} else {
return _codec.plfreq;
}
@@ -220,18 +220,16 @@
codecInstL16.rate = 128000;
codecInstL16.plfreq = 8000;
codecInstL16.pacsize = 80;
+
} else if (_fileFormat == kFileFormatPcm16kHzFile) {
codecInstL16.rate = 256000;
codecInstL16.plfreq = 16000;
codecInstL16.pacsize = 160;
+
} else if (_fileFormat == kFileFormatPcm32kHzFile) {
codecInstL16.rate = 512000;
codecInstL16.plfreq = 32000;
- codecInstL16.pacsize = 320;
- } else if (_fileFormat == kFileFormatPcm48kHzFile) {
- codecInstL16.rate = 768000;
- codecInstL16.plfreq = 48000;
- codecInstL16.pacsize = 480;
+ codecInstL16.pacsize = 160;
} else {
LOG(LS_ERROR) << "StartPlayingFile() sample frequency not "
<< "supported for PCM format.";
@@ -279,8 +277,7 @@
const CodecInst* codecInst) {
if (_fileFormat == kFileFormatPcm16kHzFile ||
_fileFormat == kFileFormatPcm32kHzFile ||
- _fileFormat == kFileFormatPcm8kHzFile ||
- _fileFormat == kFileFormatPcm48kHzFile) {
+ _fileFormat == kFileFormatPcm8kHzFile) {
CodecInst codecInstL16;
strncpy(codecInstL16.plname, "L16", 32);
codecInstL16.pltype = 93;
@@ -290,18 +287,16 @@
codecInstL16.rate = 128000;
codecInstL16.plfreq = 8000;
codecInstL16.pacsize = 80;
+
} else if (_fileFormat == kFileFormatPcm16kHzFile) {
codecInstL16.rate = 256000;
codecInstL16.plfreq = 16000;
codecInstL16.pacsize = 160;
+
} else if (_fileFormat == kFileFormatPcm32kHzFile) {
codecInstL16.rate = 512000;
codecInstL16.plfreq = 32000;
- codecInstL16.pacsize = 320;
- } else if (_fileFormat == kFileFormatPcm48kHzFile) {
- codecInstL16.rate = 768000;
- codecInstL16.plfreq = 48000;
- codecInstL16.pacsize = 480;
+ codecInstL16.pacsize = 160;
} else {
LOG(LS_ERROR) << "StartPlayingFile() sample frequency not "
<< "supported for PCM format.";
@@ -384,7 +379,6 @@
case kFileFormatPcm16kHzFile:
case kFileFormatPcm8kHzFile:
case kFileFormatPcm32kHzFile:
- case kFileFormatPcm48kHzFile:
// audio formats
return std::unique_ptr<FilePlayer>(
new FilePlayerImpl(instanceID, fileFormat));
« no previous file with comments | « webrtc/voice_engine/file_player.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698