[CM] snd: srate implicitly corrected in play ?

Kjetil Matheussen k.s.matheussen at gmail.com
Mon Nov 5 08:05:52 PST 2018


On Mon, Nov 5, 2018 at 4:58 PM <anders.vinjar at bek.no> wrote:
>
> Hi.
>
> Having jackd running in 44.1 kHz sampling rate, if i load a 48k
> soundfile in Snd, hit play, the playback sounds 'correct', ie. with
> speed/src applied to the player to make the file play (through jack) as
> if it were already resampled to 44.1k.
>
> Is this default behavior configured somewhere as a variable, or any
> place in the docs mentioning this?
>

Hi, I wrote the code. You can't turn it off in configuration, but this
patch should fix it:


--- audio.c~    2018-08-31 22:16:12.000000000 +0200
+++ audio.c     2018-11-05 17:02:42.669843114 +0100
@@ -4465,7 +4465,7 @@
   sj_readplace=0;


-  if (srate!=(int)jack_get_sample_rate(sndjack_client)){
+  if (false && srate!=(int)jack_get_sample_rate(sndjack_client)){
     int lokke;
     //printf("Warning, sample-rate differs between snd and jack.
Sound will not be played correctly!
%d/%d\n",srate,jack_get_sample_rate(sndjack_client));
     sndjack_srcratio=(double)jack_get_sample_rate(sndjack_client)/(double)srate;


More information about the Cmdist mailing list