result r = E_SUCCESS;
String fileName;
- unique_ptr<HashMap> pOption;
+ HashMap option;
__totalDecodingTime = 0;
Tizen::Media::AudioSampleType sampleType = AUDIO_TYPE_NONE;
r = __pDstBuf->Construct(dataSize * 2);
TryCatch( r == E_SUCCESS, , "Error Occurred:%s %d", GetErrorMessage(r), dataSize*2 );
- pOption.reset(new HashMap());
- TryCatch( pOption.get() != null, r = E_OUT_OF_MEMORY, "Error Occurred:%s", GetErrorMessage(E_OUT_OF_MEMORY));
- r = pOption->Construct();
+ r = option.Construct();
TryCatch( r == E_SUCCESS, , "Error Occurred:%s", GetErrorMessage(r));
r = wavReader.GetWavFormatInfo(wavInfo);
channelType = (wavInfo.nChannels == 1) ? AUDIO_CHANNEL_TYPE_MONO : AUDIO_CHANNEL_TYPE_STEREO;
sampleType = AUDIO_TYPE_PCM_S16_LE;
- pOption->Add(*(new Integer(MEDIA_PROPERTY_AUDIO_CHANNEL_TYPE)), *(new Integer(channelType)));
- pOption->Add(*(new Integer(MEDIA_PROPERTY_AUDIO_SAMPLE_RATE)), *(new Integer(wavInfo.nSamplesPerSec)));
- pOption->Add(*(new Integer(MEDIA_PROPERTY_AUDIO_SAMPLE_TYPE)), *(new Integer(sampleType)));
+
+ option.Add(*(new Integer(MEDIA_PROPERTY_AUDIO_CHANNEL_TYPE)), *(new Integer(channelType)));
+ option.Add(*(new Integer(MEDIA_PROPERTY_AUDIO_SAMPLE_RATE)), *(new Integer(wavInfo.nSamplesPerSec)));
+ option.Add(*(new Integer(MEDIA_PROPERTY_AUDIO_SAMPLE_TYPE)), *(new Integer(sampleType)));
}
else
{
__maxBytes = __pSrcBuf->GetRemaining();
- r = __pDec->Construct(__audioCodecId, pOption.get());
+ r = __pDec->Construct(__audioCodecId, &option);
TryCatch( r == E_SUCCESS, , "Error Occurred" );
+ option.RemoveAll(true);
+
if (__pProgressBar != null)
__pProgressBar->SetRange(0, __maxBytes);