summaryrefslogtreecommitdiff
path: root/plugins/dsp_libsrc
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2012-05-30 22:07:15 +0200
committerGravatar waker <wakeroid@gmail.com>2012-05-30 22:07:15 +0200
commitc6d76fb26b6b8b36798e4b4e6d5ee067eed4c734 (patch)
tree33d09a728c63cee6a756c6d721738fae517497db /plugins/dsp_libsrc
parent2b90261fad9288df60d4a215083eb16c7818102f (diff)
src: fixed automatic samplerate error when output is stopped
Diffstat (limited to 'plugins/dsp_libsrc')
-rw-r--r--plugins/dsp_libsrc/src.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/dsp_libsrc/src.c b/plugins/dsp_libsrc/src.c
index 6686ff32..826606af 100644
--- a/plugins/dsp_libsrc/src.c
+++ b/plugins/dsp_libsrc/src.c
@@ -108,6 +108,9 @@ ddb_src_process (ddb_dsp_context_t *_src, float *samples, int nframes, int maxfr
float samplerate = src->samplerate;
if (src->autosamplerate) {
DB_output_t *output = deadbeef->get_output ();
+ if (output->fmt.samplerate <= 0) {
+ return -1;
+ }
samplerate = output->fmt.samplerate;
}
@@ -268,7 +271,7 @@ ddb_src_get_param (ddb_dsp_context_t *ctx, int p, char *val, int sz) {
static const char settings_dlg[] =
"property \"Automatic Samplerate (overrides Target Samplerate)\" checkbox 2 0;\n"
- "property \"Target Samplerate\" spinbtn[8192,192000,1] 0 48000;\n"
+ "property \"Target Samplerate\" spinbtn[8000,192000,1] 0 48000;\n"
"property \"Quality / Algorithm\" select[5] 1 2 SINC_BEST_QUALITY SINC_MEDIUM_QUALITY SINC_FASTEST ZERO_ORDER_HOLD LINEAR;\n"
;