Пример #1
0
void find_next_resampler_driver(void)
{
   int i = find_resampler_driver_index(g_settings.audio.resampler);
   if (i >= 0 && backends[i + 1])
      strlcpy(g_settings.audio.resampler, backends[i + 1]->ident, sizeof(g_settings.audio.resampler));
   else
      RARCH_WARN("Couldn't find any next resampler driver (current one: \"%s\").\n", g_extern.audio_data.resampler->ident);
}
/**
 * find_resampler_driver:
 * @ident                      : Identifier of resampler driver to find.
 *
 * Finds resampler by @ident name.
 *
 * Returns: resampler driver if resampler driver was found, otherwise
 * NULL.
 **/
static const rarch_resampler_t *find_resampler_driver(const char *ident)
{
   int i = find_resampler_driver_index(ident);

   if (i >= 0)
      return resampler_drivers[i];

   return resampler_drivers[0];
}
Пример #3
0
void find_prev_resampler_driver(void)
{
   int i = find_resampler_driver_index(g_settings.audio.resampler);
   if (i > 0)
      strlcpy(g_settings.audio.resampler, resampler_drivers[i - 1]->ident,
            sizeof(g_settings.audio.resampler));
   else
      RARCH_WARN("Couldn't find any previous resampler driver (current one: \"%s\").\n",
            g_extern.audio_data.resampler->ident);
}
Пример #4
0
// Resampler is used by multiple modules so avoid clobbering g_extern.audio_data.resampler here.
static const rarch_resampler_t *find_resampler_driver(const char *ident)
{
   int i = find_resampler_driver_index(ident);
   if (i >= 0)
      return backends[i];
   else
   {
      unsigned d;
      RARCH_ERR("Couldn't find any resampler driver named \"%s\"\n", ident);
      RARCH_LOG_OUTPUT("Available resampler drivers are:\n");
      for (d = 0; backends[d]; d++)
         RARCH_LOG_OUTPUT("\t%s\n", backends[d]->ident);
      return NULL;
   }
}
Пример #5
0
static const rarch_resampler_t *find_resampler_driver(const char *ident)
{
   int i = find_resampler_driver_index(ident);
   if (i >= 0)
      return resampler_drivers[i];
   else
   {
      unsigned d;
      RARCH_ERR("Couldn't find any resampler driver named \"%s\"\n", ident);
      RARCH_LOG_OUTPUT("Available resampler drivers are:\n");
      for (d = 0; resampler_drivers[d]; d++)
         RARCH_LOG_OUTPUT("\t%s\n", resampler_drivers[d]->ident);

      RARCH_WARN("Going to default to first resampler driver ...\n");

      return resampler_drivers[0];
   }
}