Convert CNG into C++ and remove it from AudioDecoder
Broke out CNG from AudioDecoder as they didn't really share an interface. Converted the CNG code to C++, to make initialization and resource handling easier. This includes several changes to the behavior, favoring RTC_CHECKs over returning error codes. Review URL: https://codereview.webrtc.org/1868143002 Cr-Commit-Position: refs/heads/master@{#12491}
This commit is contained in:
@ -231,8 +231,8 @@ TEST(DecoderDatabase, IF_ISAC(ActiveDecoders)) {
|
||||
|
||||
// Set active CNG codec.
|
||||
EXPECT_EQ(DecoderDatabase::kOK, db.SetActiveCngDecoder(13));
|
||||
decoder = db.GetActiveCngDecoder();
|
||||
ASSERT_FALSE(decoder == NULL); // Should get a decoder here.
|
||||
ComfortNoiseDecoder* cng = db.GetActiveCngDecoder();
|
||||
ASSERT_FALSE(cng == NULL); // Should get a decoder here.
|
||||
|
||||
// Remove the active CNG decoder, and verify that the active becomes NULL.
|
||||
EXPECT_EQ(DecoderDatabase::kOK, db.Remove(13));
|
||||
|
||||
Reference in New Issue
Block a user