Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
_SndRaw and _MemFree
#1
I have two things. The first is in line with the title. Just a question. Is sound normalization applied inside Qb64 before _SndRaw sends the sound samples to the sound card? I assume it is. When saving the sound output without performing normalization (because everything was fine by ear), the output was distorted - strangely enough only at the beginning of the signal. Meanwhile, the same field played by _SndRaw before saving sounded great. Performing normalization before saving solved the problem. To test, use my program in my thread (sound generator). Before saving, turn off normalization and then play the output. Even QB64PE own _SndPlayFile, which plays the file for checking right after saving, has distorted output at the beginning (without normalization).

If this is a bug in the program, please write to me so I know what to avoid next time.

The second thing - if _MemFree has a parameter in parentheses, for example _MemFree (m), then in IDE 4.0.0 x32 it will cause a compiler error.


Reply
#2
The miniaudio library that QB64-PE uses will clip the audio signal. I am not sure if it normalizes the audio though. I'll check.

The _MEMFREE thing is by design. To use the parentheses, you can write CALL _MEMFREE (m).
Reply




Users browsing this thread: 1 Guest(s)