Lines Matching refs:context
81 VideoEditorResampler *context = new VideoEditorResampler();
82 context->mResampler = AudioResampler::create(
84 if (context->mResampler == NULL) {
87 context->mResampler->setSampleRate(android::VideoEditorResampler::kFreq32000Hz);
88 context->mResampler->setVolume(0x1000, 0x1000);
89 context->nbChannels = inChannelCount;
90 context->outSamplingRate = sampleRate;
91 context->mInput = NULL;
92 context->mTmpInBuffer = NULL;
94 return ((M4OSA_Context )context);
100 VideoEditorResampler *context =
102 context->mResampler->setSampleRate(inSampleRate);
107 context->inSamplingRate = inSampleRate;
109 context->mInput = (int16_t*)malloc( (inSampleRate * MAX_SAMPLEDURATION_FOR_CONVERTION *
110 context->nbChannels * sizeof(int16_t)) / 1000);
115 VideoEditorResampler *context =
117 context->mResampler->setVolume(left,right);
122 VideoEditorResampler *context =
125 if (context->mTmpInBuffer != NULL) {
126 free(context->mTmpInBuffer);
127 context->mTmpInBuffer = NULL;
130 if (context->mInput != NULL) {
131 free(context->mInput);
132 context->mInput = NULL;
135 if (context->mResampler != NULL) {
136 delete context->mResampler;
137 context->mResampler = NULL;
140 if (context != NULL) {
141 delete context;
142 context = NULL;
149 VideoEditorResampler *context =
153 context->nbSamples = (context->inSamplingRate * outFrameCount) / context->outSamplingRate;
154 memcpy(context->mInput,input,(context->nbSamples * context->nbChannels * sizeof(int16_t)));
162 context->mResampler->resample((int32_t *)pTmpBuffer,