Sorry for the newbie question, but I haven't had any luck with existing forum q's, the API, or general web searching - - -
I'm putting together a simple audio player app (in Windows) to better learn JUCE, sort of folowing along the examples in the "Getting Started with JUCE book". The main difference is I'm trying to play an OggVorbis audio file...
So far I've got, and this seems pretty standard:
AudoFormatManager + .ogg file ->
AudioFormatReader ->
AudioFormatReaderSource ->
AudioTransportSource ->
AudioSourcePlayer ->
AudioDeviceManager
Hooray, it plays! But at the wrong speed, because my audio device only supports 48000Hz and the ogg file is 44100Hz, and it's being sped up by that ratio on playback.
My question is how/where to correct this? I can't insert a ResamplingAudioSource in the chain because it's not Positionable. An earlier forum topic gave the impression that the TransportSource might/ought to magically do the resampling, but it sure isn't.
The transport source definitely resamples correctly if it knows what rate it should be playing at. Maybe the audio device code is misbehaving and it thinks the rate is different.. Does the juce demo audio playback work?
The only demo app I see for this is the AudioAppExample, which is a waveform generator. I hard-wired it to crank out 1000 Hz test tone and it is correct. But there's no audio file and no visible transport source so I don't know what to take away from this. Is there a different demo app that plays back an audio file?