Talk:Inverse Frequency Sound format

From ModdingWiki
Jump to navigation Jump to search

How does this sound format handle sounds who's period is zero (frequency is infinite)? This causes a divide-by-zero error when actually computed. Videogamer555 (talk) 13:27, 29 January 2022 (GMT)

Does the official source code answer your question? https://github.com/CatacombGames/Catacomb/blob/master/SOUNDLIB.ASM#L288 https://github.com/CatacombGames/TheCatacomb/blob/master/PCRLIB_A.ASM#L514 https://github.com/FlatRockSoft/Hovertank3D/blob/master/IDASM.ASM#L654 Frenkel (talk) 21:29, 29 January 2022 (GMT)

There appears to be a discrepency here.

In the Sound Definitions section, in the table it says "UINT8 rate Defines the update rate of the timer generating the sound interrupt. Usually set to 8. "

However in the paragraph right after that table, it says "The PC Speaker is updated at a rate of usually 140 Hz". So which is it? Is it 8Hz or 140Hz update rate? Or does the 8 mean something else? Does it scale the update rate, where 140Hz is represented by that field containing the number 8, so each increment of 1 in that field changes the PC speaker's update rate by 17.5Hz, with 0 meaning never update the PC speaker?

Videogamer555 (talk) 14:07, 29 January 2022 (GMT)