Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
Mcq
16
Years of Service
User Offline
Joined: 28th Dec 2007
Location:
Posted: 18th Jul 2008 20:02
i need a little help to convert this :

; --- Fetch the sound info from bass.dll and bung it in the buffer
Result = BASS_ChannelGetData(tune,Buffer,BASS_DATA_FFT512) ; result=-1 if it fails i think
; --- Setup 128 bars, got this from one of the examples
For I = 0 To 128
Value# = PeekFloat#(Buffer,I * 4) ; Get the value (it will be floating point)
; --- Set up colours and position bars (value# will be small so times it to make it bigger)
Color 255,0,0 : Rect 60+(I * 4),(height-1) - (Value# * 1000),3,Value# * 1000
Color 0,255,255 : Rect 60+(I * 4),(height-1) - Value# * 1000,3,2
Next

from blitz basic to Dark Basic

my bass.dll is running now..
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 18th Jul 2008 21:22
I've only just spotted this because TBH, it's not beginners stuff.

Anyway, DBPro doesn't come with peek functions by default. You should try to engineer things so that this buffer you are using is actually the address of a memblock, then you can use the memblock functions to read from it.

If you can't do that for some reason, then take a look at my plug-in set - there are the full range of peek/poke functions & commands in one of the earlier plug-ins in the set.

Login to post a reply

Server time is: 2024-09-27 18:24:14
Your offset time is: 2024-09-27 18:24:14