Re: [AD] sound frequency?

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On my laptop, which has an ESS card of some sort (ES1868?), DOS programs are 
slightly out of tune, usually sharp, and the pitch depends on the frequency 
requested of the card. Windows programs were always in tune. It could be 
something similar in your case.

If you speed sound up, it will sound higher pitched. If you slow it down, it 
will sound lower pitched. That's because pitch increases with the frequency 
of a wave form.

I suspect your ALSA driver is telling applications that it's running at 44100 
Hz, when it's actually running at 45454 Hz. Allegro generates sound suitable 
for playback at 44100 Hz, and then it gets played too fast, at 45454 Hz, so 
it sounds higher pitched.

It's also possible that Allegro is requesting 44100 Hz and getting 45454 Hz, 
and is not smart enough to notice the difference. Anyone feel like 
investigating?

The figure 45454 comes from the early Sound Blasters. It wasn't possible to 
specify a precise frequency, only some value (a period maybe?) with limited 
precision. 45454 was the closest to 44100.

Ben

On Thursday 6 May 2004 13:17, Elias Pschernig wrote:
> When testing the digmid patch before.. I noticed something strange:
> Allegro's ALSA driver would pitch my .mids slightly higher than the OSS
> driver. I found out, the difference is due to the default frequency:
> ALSA uses 44100, OSS 45454.
>
> I have no idea how sound works.. but still, I'm wondering now. Why do
> different frequency values change the pitch of a midi, and which value
> should be used as default? Different values for OSS/ALSA as right now
> probably is not the right thing.
>
> Anyone can shed light on this?




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/