This commit is contained in:
wesj 2013-04-15 17:17:16 -07:00
Родитель a2f8aca290
Коммит 6263219875
1 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -158,17 +158,17 @@ audiotrack_get_min_frame_count(cubeb * ctx, cubeb_stream_params * params, int *
/* Recent Android have a getMinFrameCount method. On Froyo, we have to compute it by hand. */
if (audiotrack_version_is_froyo(ctx)) {
int samplerate, frame_count, latency, min_buffer_count;
status = ctx->klass.get_output_frame_count(&frame_count, AUDIO_STREAM_TYPE_MUSIC);
status = ctx->klass.get_output_frame_count(&frame_count, params->stream_type);
if (status) {
ALOG("error getting the output frame count.");
return CUBEB_ERROR;
}
status = ctx->klass.get_output_latency((uint32_t*)&latency, AUDIO_STREAM_TYPE_MUSIC);
status = ctx->klass.get_output_latency((uint32_t*)&latency, params->stream_type);
if (status) {
ALOG("error getting the output frame count.");
return CUBEB_ERROR;
}
status = ctx->klass.get_output_samplingrate(&samplerate, AUDIO_STREAM_TYPE_MUSIC);
status = ctx->klass.get_output_samplingrate(&samplerate, params->stream_type);
if (status) {
ALOG("error getting the output frame count.");
return CUBEB_ERROR;
@ -186,9 +186,9 @@ audiotrack_get_min_frame_count(cubeb * ctx, cubeb_stream_params * params, int *
}
/* Recent Android have a getMinFrameCount method. */
if (!audiotrack_version_is_gingerbread(ctx)) {
status = ctx->klass.get_min_frame_count(min_frame_count, AUDIO_STREAM_TYPE_MUSIC, params->rate);
status = ctx->klass.get_min_frame_count(min_frame_count, params->stream_type, params->rate);
} else {
status = ctx->klass.get_min_frame_count_gingerbread(min_frame_count, AUDIO_STREAM_TYPE_MUSIC, params->rate);
status = ctx->klass.get_min_frame_count_gingerbread(min_frame_count, params->stream_type, params->rate);
}
if (status != 0) {
ALOG("error getting the min frame count");