Number of input channels


#1

Hi,

i’m working on a plugin in which you can load a sound and then play it.

Unfortunately, i’m unable to change the number of input channels according to sound properties and a mono sound is read as a stereo one (i.e. two times too fast).

Has anybody got an idea to solve my problem ?

Thanx in advance.


#2

A plugin’s input channels are fixed because not all hosts/plugin formats allow this to change dynamically.

No idea what you mean about the sound being too fast - none of the juce code uses interleaved sample buffers, so I don’t see how that could happen. Can you explain a bit better?


#3

When i play a mono sound, i got the same result as if the samplerate was two times higher. In fact, i assumed it was due to “stereo way playing”.

Normally, if i load a mono sound in the plugin (initialized in stereo), is there a way to play it correctly ?


#4

you say “play a sound”?? How? What classes? What kind of plugin? What host? There are thousands of ways to “play a sound”!

Most likely you’re just not correcting the sample rate to match the host’s output rate.


#5