Wave freq vs freq of its oscillating source

Sorry if this is a dumb question, but I just read this in my physics textbook and I'm confused. It said that the frequency of a periodic wave is identical to the oscillating frequency of its source. I don't understand how this can always be true since the velocity of the wave is determined by the medium it's in. It would seem to me that if you had an oscillating source with a frequency f in a medium in which waves traveled very slowly, and then you put that same source with the same frequency f in a medium where waves travel very fast, that the two waves frequencies shouldn't be the same.

I know I'm just thinking about it wrong, but if someone could help me understand how this relationship works, and why the speed of the medium makes no difference, I would be grateful.

Thanks
 PhysOrg.com physics news on PhysOrg.com >> Study provides better understanding of water's freezing behavior at nanoscale>> Soft matter offers new ways to study how ordered materials arrange themselves>> Making quantum encryption practical
 I could see why a beginners book would say that, but you have to realize this is not accounting for frictional/heat losses which you would always have in the real world. A non perfect wave transmitting medium (everything) would not act as expected. Imagine laying a floor speaker on its back and filling the speaker cone with water. According to your text you would see perfect concentric circles in the water with every beat of the speaker, but really you would see a chaotic display of all the losses your text has not mentioned. If the first beat of the speaker created even a slight non-perfect wave (it will), the continuing beats will magnify it and chaotic waves will prevail. Keep in mind the chaos is only because we can't possibly calculate all these tiny variations from a non-perfect scenario.
 When the medium is changed, the velocity changes not due to a change in frequency, but due to change in the wavelength.