Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  cubeb-output-latency.h   Sprache: C

 
#ifndef _CUBEB_OUTPUT_LATENCY_H_
#define _CUBEB_OUTPUT_LATENCY_H_

#include "../cubeb-jni.h"
#include "cubeb_media_library.h"
#include <stdbool.h>

struct output_latency_function {
  media_lib * from_lib;
  cubeb_jni * from_jni;
  int version;
};

typedef struct output_latency_function output_latency_function;

const int ANDROID_JELLY_BEAN_MR1_4_2 = 17;

output_latency_function *
cubeb_output_latency_load_method(int version)
{
  output_latency_function * ol = NULL;
  ol = (output_latency_function *)calloc(1, sizeof(output_latency_function));

  ol->version = version;

  if (ol->version > ANDROID_JELLY_BEAN_MR1_4_2) {
    ol->from_jni = cubeb_jni_init();
    return ol;
  }

  ol->from_lib = cubeb_load_media_library();
  return ol;
}

bool
cubeb_output_latency_method_is_loaded(output_latency_function * ol)
{
  assert(ol);
  if (ol->version > ANDROID_JELLY_BEAN_MR1_4_2) {
    return !!ol->from_jni;
  }

  return !!ol->from_lib;
}

void
cubeb_output_latency_unload_method(output_latency_function * ol)
{
  if (!ol) {
    return;
  }

  if (ol->version > ANDROID_JELLY_BEAN_MR1_4_2 && ol->from_jni) {
    cubeb_jni_destroy(ol->from_jni);
  }

  if (ol->version <= ANDROID_JELLY_BEAN_MR1_4_2 && ol->from_lib) {
    cubeb_close_media_library(ol->from_lib);
  }

  free(ol);
}

extern "C" {

uint32_t
cubeb_get_output_latency(output_latency_function * ol)
{
  assert(cubeb_output_latency_method_is_loaded(ol));

  if (ol->version > ANDROID_JELLY_BEAN_MR1_4_2) {
    return cubeb_get_output_latency_from_jni(ol->from_jni);
  }

  return cubeb_get_output_latency_from_media_library(ol->from_lib);
}
}

#endif // _CUBEB_OUTPUT_LATENCY_H_

Messung V0.5
C=98 H=100 G=98

¤ Dauer der Verarbeitung: 0.1 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge