Merge pull request #22 from wesj/master

Mozilla bug 809558 - Add stream type support
This commit is contained in:
Matthew Gregan 2013-04-15 17:24:12 -07:00
Родитель a2f8aca290 6263219875
Коммит 3ac8db88d9
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");