src/audio/SDL_audio.c
changeset 9410 e25530faeda0
parent 9405 22d4e4b5a5e5
child 9421 fd5dd91ec0ce
equal deleted inserted replaced
9409:9df20f292907 9410:e25530faeda0
   297     SDL_AudioDeviceItem *item = (SDL_AudioDeviceItem *) SDL_malloc(size);
   297     SDL_AudioDeviceItem *item = (SDL_AudioDeviceItem *) SDL_malloc(size);
   298     if (item == NULL) {
   298     if (item == NULL) {
   299         return -1;
   299         return -1;
   300     }
   300     }
   301 
   301 
   302     SDL_assert(handle != NULL);
   302     SDL_assert(handle != NULL);  /* we reserve NULL, audio backends can't use it. */
   303 
   303 
   304     item->handle = handle;
   304     item->handle = handle;
   305     SDL_strlcpy(item->name, name, size - sizeof (SDL_AudioDeviceItem));
   305     SDL_strlcpy(item->name, name, size - sizeof (SDL_AudioDeviceItem));
   306 
   306 
   307     SDL_LockMutex(current_audio.detectionLock);
   307     SDL_LockMutex(current_audio.detectionLock);