diff options
Diffstat (limited to 'sound/voc.h')
-rw-r--r-- | sound/voc.h | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/sound/voc.h b/sound/voc.h index b516575f54..5768be2c19 100644 --- a/sound/voc.h +++ b/sound/voc.h @@ -48,17 +48,10 @@ struct VocBlockHeader { #pragma END_PACK_STRUCTS #endif - -static inline int getSampleRateFromVOCRate(int vocSR) { - if (vocSR == 0xa5 || vocSR == 0xa6) { - return 11025; - } else if (vocSR == 0xd2 || vocSR == 0xd3) { - return 22050; - } else { - int sr = 1000000L / (256L - vocSR); - warning("inexact sample rate used: %i (0x%x)", sr, vocSR); - return sr; - } -} +/** + * Take a sample rate parameter as it occurs in a VOC sound header, and + * return the corresponding sample frequency. + */ +extern int getSampleRateFromVOCRate(int vocSR); #endif |