Bug 1410456 - remove get latency implementation because makes use of dlopen. r?padenot
MozReview-Commit-ID: 1Mc2dSk0hlc
--- a/media/libcubeb/src/cubeb_opensl.c
+++ b/media/libcubeb/src/cubeb_opensl.c
@@ -1577,34 +1577,16 @@ opensl_stream_get_position(cubeb_stream
unadjusted_position : maximum_position;
} else {
*position = 0;
}
return CUBEB_OK;
}
int
-opensl_stream_get_latency(cubeb_stream * stm, uint32_t * latency)
-{
- int r;
- uint32_t mixer_latency; // The latency returned by AudioFlinger is in ms.
-
- /* audio_stream_type_t is an int, so this is okay. */
- r = stm->context->get_output_latency(&mixer_latency, AUDIO_STREAM_TYPE_MUSIC);
- if (r) {
- return CUBEB_ERROR;
- }
-
- *latency = stm->latency_frames + // OpenSL latency
- mixer_latency * stm->inputrate / 1000; // AudioFlinger latency
-
- return CUBEB_OK;
-}
-
-int
opensl_stream_set_volume(cubeb_stream * stm, float volume)
{
SLresult res;
SLmillibel max_level, millibels;
float unclamped_millibels;
res = (*stm->volume)->GetMaxVolumeLevel(stm->volume, &max_level);
@@ -1641,16 +1623,16 @@ static struct cubeb_ops const opensl_ops
.device_collection_destroy = NULL,
.destroy = opensl_destroy,
.stream_init = opensl_stream_init,
.stream_destroy = opensl_stream_destroy,
.stream_start = opensl_stream_start,
.stream_stop = opensl_stream_stop,
.stream_reset_default_device = NULL,
.stream_get_position = opensl_stream_get_position,
- .stream_get_latency = opensl_stream_get_latency,
+ .stream_get_latency = NULL,
.stream_set_volume = opensl_stream_set_volume,
.stream_set_panning = NULL,
.stream_get_current_device = NULL,
.stream_device_destroy = NULL,
.stream_register_device_changed_callback = NULL,
.register_device_collection_changed = NULL
};