SetPeriod does not seem to like values I am inputting
I'm trying to change the pitch of a sound I loaded using SetPeriod, and I am using the following table (taken from the Protracker player source):
Code:
856,808,762,720,678,640,604,570,538,508,480,453 Code:
C-1,C#1,D-1,D#1,E-1,F-1,F#1,G-1,G#1,A-1,A#1,B-1 Any ideas? |
Nobody? :crying
[edit] for reference, this is a simplified version of the code I am using: Code:
Statement LaunchSample {track,period} |
Quote:
|
Quote:
Code:
_data.l ;00: NULL if no sound present, else pointer to sound data |
Hmmm, I haven't looked at this properly on my own machine, but is it possible your types are getting mixed up? The struct definitely does use a word type, but if your function is taking a value of a different type, things might be getting mangled. Try defining the types in your statement definition:
Code:
Statement LaunchSample {track.w, period.w} |
Quote:
Code:
DEFTYPE .w [edit] gave it a try, same problem. Could this be a bug in the sound library of Blitz? |
Absolutely, it could definitely be a bug, or even something silly like an error in the Newtype definition in bb2objtypes... At some point when I have time I'll try it out and see if I can spot anything.
|
Quote:
I installed the latest UBB, I thought the sound library was patched, but I still get that "Illegal Chanel" (sic) error on compiling on the specific line that sets the period (which doesn't even use channel mask to work) |
Quote:
At the very least, SetPeriod is bugged and uses the wrong data type to try to change the period. If anybody got it to work, ever, please post here and share exactly how. My solution was to make my own routine to change the period. |
All times are GMT +2. The time now is 07:25. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.