예제 #1
0
void _p(const char * s,byte * d, uint ld, uint w) {
  if (!_screen_m) {
     _screen_m = Mutex_new(0);
  }
  
  Mutex_lock ( _screen_m );
  printf(" - - - [%s] - - -\n",s);
  dump_data_as_hex(d,ld,w);  
  printf(" - - - - - - - - \n");
  Mutex_unlock(_screen_m);
}
예제 #2
0
static AudioQualityImprovement *
AudioQualityImprovement_new
    (const char *stringID, jlong longID, AudioQualityImprovement *next)
{
    AudioQualityImprovement *aqi = calloc(1, sizeof(AudioQualityImprovement));

    if (aqi)
    {
        /* stringID */
        size_t slen = strlen(stringID);
        aqi->stringID = malloc(slen + 1);

        if (!(aqi->stringID))
        {
            AudioQualityImprovement_free(aqi);
            return NULL;
        }
        strncpy(aqi->stringID, stringID, slen);
        aqi->stringID[slen] = 0x00;

        /* mutex */
        aqi->mutex = Mutex_new(NULL);
        if (!(aqi->mutex))
        {
            AudioQualityImprovement_free(aqi);
            return NULL;
        }

        aqi->inputLatency = -1;
        aqi->longID = longID;
        aqi->next = next;
        aqi->outputLatency = -1;
        aqi->retainCount = 1;
        aqi->suppressEcho = JNI_TRUE;
    }
    return aqi;
}
예제 #3
0
/** Loads the <tt>AudioQualityImprovement</tt> class. */
void
AudioQualityImprovement_load()
{
    AudioQualityImprovement_sharedInstancesMutex = Mutex_new(NULL);
}