File sampling rate conversion

Hmmmm … just noticed an interesting thing. If I load my audio device at some sampling rate, then create a reader based on a file with a different sampling rate … anything read from that file is read at the files rate, but then played at the audioDevice rate …

hence … vocals get a nice sampling rate conversion. Easy enough to correct, if I have directly addressable buffers and iterate through them … but it made me laugh for a second.

Wouldn’t it be easy enough to add in a feature to the audio reader to intellegently cope with mismatchs in sampling rate … just as it already does for number of channels?

Sounds like you just need to use an AudioTransportSource, which takes care of all of that stuff…?