зеркало из https://github.com/mozilla/cubeb.git
Merge pull request #22 from wesj/master
Mozilla bug 809558 - Add stream type support
This commit is contained in:
Коммит
3ac8db88d9
|
@ -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");
|
||||
|
|
Загрузка…
Ссылка в новой задаче