Some Panning fixes.

This commit is contained in:
Themaister 2014-05-20 14:00:34 +02:00
parent ead69172a2
commit 1b9bbbd381
5 changed files with 30 additions and 6 deletions

View File

@ -128,6 +128,7 @@ static int get_int(void *userdata, const char *key_str, int *value, int default_
{ \
*values = (T*)calloc(num_default_values, sizeof(T)); \
memcpy(*values, default_values, sizeof(T) * num_default_values); \
*out_num_values = num_default_values; \
return false; \
}
@ -164,7 +165,7 @@ static int get_string(void *userdata, const char *key_str,
}
}
static void dspfilter_free(void *userdata, void *ptr)
static void dspfilter_free(void *ptr)
{
free(ptr);
}
@ -225,7 +226,7 @@ static bool append_plugs(rarch_dsp_filter_t *dsp, struct string_list *list)
unsigned i;
dspfilter_simd_mask_t mask = rarch_get_cpu_features();
for (i = 0; i < dsp->num_plugs; i++)
for (i = 0; i < list->size; i++)
{
dylib_t lib = dylib_load(list->elems[i].data);
if (!lib)

View File

@ -24,11 +24,11 @@ void rarch_dsp_filter_free(rarch_dsp_filter_t *dsp);
struct rarch_dsp_data
{
const float *input;
float *input;
unsigned input_frames;
// Set by rarch_dsp_filter_process().
const float *output;
float *output;
unsigned output_frames;
};

View File

@ -7,7 +7,6 @@ filter0 = panning
panning_left_mix = "1.0 0.0"
panning_right_mix = "0.0 1.0"
# Some examples:
#
# Mono:
@ -17,4 +16,8 @@ panning_right_mix = "0.0 1.0"
# Swap left and right channels:
# panning_left_mix = "0.0 1.0"
# panning_right_mix = "1.0 0.0"
#
# Mono on one speaker:
# panning_left_mix = "0.5 0.5"
# panning_right_mix = "0.0 0.0"

View File

@ -1,3 +1,18 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include "dspfilter.h"
#include <math.h>
#include <stdlib.h>
@ -52,8 +67,13 @@ static void *panning_init(const struct dspfilter_info *info,
if (num_left == 2)
memcpy(pan->left, left, sizeof(pan->left));
else
memcpy(pan->left, default_left, sizeof(pan->left));
if (num_right == 2)
memcpy(pan->right, right, sizeof(pan->right));
else
memcpy(pan->right, default_right, sizeof(pan->right));
config->free(left);
config->free(right);

View File

@ -4061,7 +4061,7 @@ static void menu_common_setting_set_label(char *type_str, size_t type_str_size,
}
break;
case RGUI_SETTINGS_AUDIO_DSP_FILTER:
strlcpy(type_str, g_settings.audio.dsp_plugin, type_str_size);
strlcpy(type_str, path_basename(g_settings.audio.dsp_plugin), type_str_size);
break;
#ifdef HAVE_OVERLAY
case RGUI_SETTINGS_OVERLAY_PRESET: