Simple Question, Complex Answer
Kawabuggy, this is one of those recurring questions that only occur to those who actually think about what's going on inside the firearm.
SL1 has a grasp of the problem and is on the right track, but it's still more complex.
Bullet velocity at the muzzle (in conventional firearms) is dependent on three major factors and a host of minor factors.
Most obvious factor is the ratio of powder weight to bullet weight. In other words, the more powder (everything else being equal) the faster the bullet goes. That's why 'magnum' rounds always have bigger cases. Second obvious factor is expansion ratio; the ratio of volume of chamber space of an unfired round to the total volume of the chamber space, throat and barrel to the muzzle. People think of this as 'barrel length', and it certainly is the controlling factor, but it is in fact the space involved. Third factor is the burning rate of the propellant powder.
Barrel to bullet friction is a faction, but rather minor.
If one looks at the interior space of a barrel, it is obvious a larger bore diameter gains volume with barrel length quicker than a smaller bore. To word differently, a .22 bore gains much less volume than a .45 bore in the same length of barrel. Therefore, with identical chamber volume, the .45 has a much greater expansion ratio per length of barrel.
The complication comes in with the practical application. To compare a .45 anything with a .22 anything is difficult in this fashion. The lightest .45 bullet of which I'm aware is 155 grains. A 155 grain .22 bullet would be rather impressive in length; whereas a 40 grain .45 bullet would be odd looking at the least. Seating and crimping a 40 grain .45 bullet would be a real treat as well.
Okay, back to more or less reality. A longer barrel gives more expansion ratio, but that is limited by practicality. A 36 in barrel is pretty long. However, at some point, the pressure level within the system must drop low enough to not be pushing the bullet anymore. It is the pressure difference between the pushing part - inside - and the atmospheric pressure - outside - resisting the movement of the bullet.
This whole science of interior ballistics - which is what you're asking - is far too deep to adequately discuss here. I can recommend two good sources for your study and information. One is the book
Pressure Factors by Dr. Lloyd Brownell, published by Wolfe Press. The other is the "Powley Computer" at
http://kwk.us/powley.html.
The original Powley Computer was a slide rule sort of thing, designed by Homer Powley, a gunsmith, ballastician and freaking genius. If you explore this devise and read all the notes, you will begin to get an idea of how this works.
In short, there is no single "one inch of barrel increases velocity by X amount" statement applying to all cartridges. But it is a fascinating field of study.