Triode wrote: 
> Yes - its currently picking the next highest supported rate; or the max
> supported rate (if the input rate exceeds max rate).  I believe alsa
> picks the closest supported rate too.

This has changed slightly - can you see if you like/dislike the new
algorithm which is intended to also allow synchronous downsample of dsd
converted to pcm:


Code:
--------------------
    
        if (r->exception) {
                // find direct match - avoid resampling
                for (i = 0; supported_rates[i]; i++) {
                        if (raw_sample_rate == supported_rates[i]) {
                                outrate = raw_sample_rate;
                                break;
                        }
                }
        }
  
        if (!outrate) {
                if (r->max_rate) {
                        // resample to max rate for device
                        outrate = supported_rates[0];
                } else {
                        // resample to max sync sample rate
                        for (i = 0; supported_rates[i]; i++) {
                                if (supported_rates[i] % raw_sample_rate == 0 
|| raw_sample_rate % supported_rates[i] == 0) {
                                        outrate = supported_rates[i];
                                        break;
                                }
                        }
                }
                if (!outrate) {
                        outrate = supported_rates[0];
                }
        }
  
--------------------


------------------------------------------------------------------------
Triode's Profile: http://forums.slimdevices.com/member.php?userid=17
View this thread: http://forums.slimdevices.com/showthread.php?t=99395

_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix

Reply via email to