summaryrefslogtreecommitdiff
path: root/plugins/alsa
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2010-12-30 23:16:24 +0100
committerGravatar waker <wakeroid@gmail.com>2010-12-30 23:16:24 +0100
commit5d8256e110c909ec8ff4d977ae57f1c7e83ac0a9 (patch)
treea6310089f2480ef951d786f3f1596e3a57d986f4 /plugins/alsa
parent2a58af927c9b5a646d1f8a2b22ffe9ef9fea4f95 (diff)
removed "use alsa resampling" option, now it is always on
Diffstat (limited to 'plugins/alsa')
-rw-r--r--plugins/alsa/alsa.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/plugins/alsa/alsa.c b/plugins/alsa/alsa.c
index ea622981..e0929779 100644
--- a/plugins/alsa/alsa.c
+++ b/plugins/alsa/alsa.c
@@ -52,7 +52,6 @@ static snd_pcm_uframes_t period_size;
static snd_pcm_uframes_t req_buffer_size;
static snd_pcm_uframes_t req_period_size;
-static int conf_alsa_resample = 0;
static char conf_alsa_soundcard[100] = "default";
//static snd_async_handler_t *pcm_callback;
@@ -187,7 +186,7 @@ palsa_set_hw_params (ddb_waveformat_t *fmt) {
int val = fmt->samplerate;
int ret = 0;
- if ((err = snd_pcm_hw_params_set_rate_resample (audio, hw_params, conf_alsa_resample)) < 0) {
+ if ((err = snd_pcm_hw_params_set_rate_resample (audio, hw_params, 1)) < 0) {
fprintf (stderr, "cannot setup resampling (%s)\n",
snd_strerror (err));
goto error;
@@ -295,9 +294,7 @@ palsa_init (void) {
// get and cache conf variables
strcpy (conf_alsa_soundcard, deadbeef->conf_get_str ("alsa_soundcard", "default"));
- conf_alsa_resample = deadbeef->conf_get_int ("alsa.resample", 0);
trace ("alsa_soundcard: %s\n", conf_alsa_soundcard);
- trace ("alsa.resample: %d\n", conf_alsa_resample);
snd_pcm_sw_params_t *sw_params = NULL;
state = OUTPUT_STATE_STOPPED;
@@ -625,8 +622,7 @@ palsa_configchanged (DB_event_t *ev, uintptr_t data) {
int buffer = deadbeef->conf_get_int ("alsa.buffer", DEFAULT_BUFFER_SIZE);
int period = deadbeef->conf_get_int ("alsa.period", DEFAULT_PERIOD_SIZE);
if (audio &&
- (alsa_resample != conf_alsa_resample
- || strcmp (alsa_soundcard, conf_alsa_soundcard)
+ (strcmp (alsa_soundcard, conf_alsa_soundcard)
|| buffer != req_buffer_size
|| period != req_period_size)) {
trace ("alsa: config option changed, restarting\n");
@@ -688,7 +684,6 @@ alsa_load (DB_functions_t *api) {
}
static const char settings_dlg[] =
- "property \"Use ALSA resampling\" checkbox alsa.resample 0;\n"
"property \"Release device while stopped\" checkbox alsa.freeonstop 0;\n"
"property \"Preferred buffer size\" entry alsa.buffer " DEFAULT_BUFFER_SIZE_STR ";\n"
"property \"Preferred period size\" entry alsa.period " DEFAULT_PERIOD_SIZE_STR ";\n"