Merge pull request #2414 from zavadovsky/opensles_fixes

opensles fixes
This commit is contained in:
Hardening 2015-12-14 17:22:38 +01:00
commit 55d097a161
2 changed files with 2 additions and 26 deletions

View File

@ -306,6 +306,7 @@ int android_AudioOut(OPENSL_STREAM *p, const short *buffer,int size)
return -1;
}
memcpy(data, buffer, size * sizeof(short));
Queue_Enqueue(p->queue, data);
(*p->bqPlayerBufferQueue)->Enqueue(p->bqPlayerBufferQueue,
data, sizeof(short) * size);

View File

@ -138,32 +138,7 @@ static BOOL rdpsnd_opensles_set_format(rdpsndDevicePlugin* device,
opensles->rate = format->nSamplesPerSec;
opensles->channels = format->nChannels;
switch (format->wFormatTag)
{
case WAVE_FORMAT_PCM:
switch (format->wBitsPerSample)
{
case 4:
opensles->format = WAVE_FORMAT_ADPCM;
break;
case 8:
opensles->format = WAVE_FORMAT_PCM;
break;
case 16:
opensles->format = WAVE_FORMAT_ADPCM;
break;
}
break;
case WAVE_FORMAT_ADPCM:
case WAVE_FORMAT_DVI_ADPCM:
opensles->format = format->wFormatTag;
break;
}
opensles->format = format->wFormatTag;
opensles->wformat = format->wFormatTag;
opensles->block_size = format->nBlockAlign;
}