From ec2e56f5f7413f1aa7775584257f164c4b7109e3 Mon Sep 17 00:00:00 2001 From: tipok Date: Thu, 6 Nov 2008 22:00:00 +0000 Subject: [PATCH] Implement encoding mono (with SBR), re #2 --- .../branches/darkice-aacp/src/aacPlusEncoder.cpp | 16 ++++++++++++---- .../branches/darkice-aacp/src/aacPlusEncoder.h | 4 ++-- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/darkice/branches/darkice-aacp/src/aacPlusEncoder.cpp b/darkice/branches/darkice-aacp/src/aacPlusEncoder.cpp index 2ce24a7..7118865 100644 --- a/darkice/branches/darkice-aacp/src/aacPlusEncoder.cpp +++ b/darkice/branches/darkice-aacp/src/aacPlusEncoder.cpp @@ -145,8 +145,9 @@ aacPlusEncoder :: open ( void ) aacplusOpen = true; reportEvent(10, "bitrate=", bitrate); reportEvent(10, "nChannelsIn", getInChannel()); + reportEvent(10, "nChannelsOut", getOutChannel()); reportEvent(10, "nChannelsSBR", nChannelsSBR); - reportEvent(10, "nChannelsOut", nChannelsAAC); + reportEvent(10, "nChannelsAAC", nChannelsAAC); reportEvent(10, "sampleRateAAC", sampleRateAAC); reportEvent(10, "inSamples", inSamples); return true; @@ -181,8 +182,15 @@ aacPlusEncoder :: write ( const void * buf, reportEvent(10, "converting short to float"); short *TimeDataPcm = (short *) buf; - for (i=0; i 2 ) { throw Exception( __FILE__, __LINE__, "unsupported number of input channels for the encoder", getInChannel() ); } - if ( getOutChannel() != 2 ) { + if ( getOutChannel() > 2 ) { throw Exception( __FILE__, __LINE__, "unsupported number of output channels for the encoder", getOutChannel() );