media_lib *
cubeb_load_media_library()
{
media_lib ml = {};
ml.libmedia = dlopen("libmedia.so", RTLD_LAZY); if (!ml.libmedia) { return nullptr;
}
// Get the latency, in ms, from AudioFlinger. First, try the most recent // signature. status_t AudioSystem::getOutputLatency(uint32_t* latency, // audio_stream_type_t streamType)
ml.get_output_latency = (get_output_latency_ptr)dlsym(
ml.libmedia, "_ZN7android11AudioSystem16getOutputLatencyEPj19audio_stream_type_t"); if (!ml.get_output_latency) { // In case of failure, try the signature from legacy version. // status_t AudioSystem::getOutputLatency(uint32_t* latency, int streamType)
ml.get_output_latency = (get_output_latency_ptr)dlsym(
ml.libmedia, "_ZN7android11AudioSystem16getOutputLatencyEPji"); if (!ml.get_output_latency) { return nullptr;
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.