mirror of
https://github.com/libretro/RetroArch
synced 2025-03-21 13:20:52 +00:00
Some Panning fixes.
This commit is contained in:
parent
ead69172a2
commit
1b9bbbd381
@ -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)); \
|
*values = (T*)calloc(num_default_values, sizeof(T)); \
|
||||||
memcpy(*values, default_values, sizeof(T) * num_default_values); \
|
memcpy(*values, default_values, sizeof(T) * num_default_values); \
|
||||||
|
*out_num_values = num_default_values; \
|
||||||
return false; \
|
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);
|
free(ptr);
|
||||||
}
|
}
|
||||||
@ -225,7 +226,7 @@ static bool append_plugs(rarch_dsp_filter_t *dsp, struct string_list *list)
|
|||||||
unsigned i;
|
unsigned i;
|
||||||
dspfilter_simd_mask_t mask = rarch_get_cpu_features();
|
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);
|
dylib_t lib = dylib_load(list->elems[i].data);
|
||||||
if (!lib)
|
if (!lib)
|
||||||
|
@ -24,11 +24,11 @@ void rarch_dsp_filter_free(rarch_dsp_filter_t *dsp);
|
|||||||
|
|
||||||
struct rarch_dsp_data
|
struct rarch_dsp_data
|
||||||
{
|
{
|
||||||
const float *input;
|
float *input;
|
||||||
unsigned input_frames;
|
unsigned input_frames;
|
||||||
|
|
||||||
// Set by rarch_dsp_filter_process().
|
// Set by rarch_dsp_filter_process().
|
||||||
const float *output;
|
float *output;
|
||||||
unsigned output_frames;
|
unsigned output_frames;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -7,7 +7,6 @@ filter0 = panning
|
|||||||
panning_left_mix = "1.0 0.0"
|
panning_left_mix = "1.0 0.0"
|
||||||
panning_right_mix = "0.0 1.0"
|
panning_right_mix = "0.0 1.0"
|
||||||
|
|
||||||
|
|
||||||
# Some examples:
|
# Some examples:
|
||||||
#
|
#
|
||||||
# Mono:
|
# Mono:
|
||||||
@ -17,4 +16,8 @@ panning_right_mix = "0.0 1.0"
|
|||||||
# Swap left and right channels:
|
# Swap left and right channels:
|
||||||
# panning_left_mix = "0.0 1.0"
|
# panning_left_mix = "0.0 1.0"
|
||||||
# panning_right_mix = "1.0 0.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"
|
||||||
|
|
||||||
|
@ -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 "dspfilter.h"
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -52,8 +67,13 @@ static void *panning_init(const struct dspfilter_info *info,
|
|||||||
|
|
||||||
if (num_left == 2)
|
if (num_left == 2)
|
||||||
memcpy(pan->left, left, sizeof(pan->left));
|
memcpy(pan->left, left, sizeof(pan->left));
|
||||||
|
else
|
||||||
|
memcpy(pan->left, default_left, sizeof(pan->left));
|
||||||
|
|
||||||
if (num_right == 2)
|
if (num_right == 2)
|
||||||
memcpy(pan->right, right, sizeof(pan->right));
|
memcpy(pan->right, right, sizeof(pan->right));
|
||||||
|
else
|
||||||
|
memcpy(pan->right, default_right, sizeof(pan->right));
|
||||||
|
|
||||||
config->free(left);
|
config->free(left);
|
||||||
config->free(right);
|
config->free(right);
|
||||||
|
@ -4061,7 +4061,7 @@ static void menu_common_setting_set_label(char *type_str, size_t type_str_size,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case RGUI_SETTINGS_AUDIO_DSP_FILTER:
|
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;
|
break;
|
||||||
#ifdef HAVE_OVERLAY
|
#ifdef HAVE_OVERLAY
|
||||||
case RGUI_SETTINGS_OVERLAY_PRESET:
|
case RGUI_SETTINGS_OVERLAY_PRESET:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user