Bass23

Blitz3D Forums/Blitz3D Userlibs/Bass23

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Thanks Abrexxes, but somehow, with the SBLive, I can't seem to get thr recording channel. Maybe what i think I should try to get the main audio out channel and use that for a spectrum display thingy. I just don't know how to do it! How do you get HMUSIC?

Thx for any help

EDIT: Oops HMUSIC is when playing MODs, and I don't want to do that. I want to get either Line-In or Microphone. Following code doesn't work, because it doesn't want to use the device for some reason.
Include "includes\bass.bb"

spectrum = CreateBank(2048)
Timer = CreateTimer(60)
Graphics 640,480,0,2
SetBuffer BackBuffer()

ok = BASS_Init(-1,48000,0,0,BASS_NULL)
If ok = False Then Print "BASS_Init: not ok, aborted!"  : WaitKey : End

ok = BASS_RecordSetInput(0,BASS_INPUT_ON); And BASS_INPUT_LEVEL And 100) 
If ok = False Then Print "BASS_RecordSetInput: not ok, aborted!"  : WaitKey : End

channel = BASS_RecordStartInt(48000,2,BASS_SAMPLE_FLOAT,0,0)
ok = BASS_ChannelPlay(channel,BASS_FALSE)
If ok = False Then Print "BASS_ChannelPlay: not ok, aborted!"  : WaitKey : End

Global counter = 0
  
While Not KeyHit (1)
Cls
Color 255,255,255
;Text 0,0,"Bass Spectrum 2"
BASS_ChannelGetData(channel, spectrum, BASS_DATA_FFT1024)
Color 255,0,0
For i = 0 To 639 Step 4
	val# = PeekFloat (spectrum,I)
	Rect i,400-(val*1000),4,3,1
Next

WaitTimer Timer 
Flip 0
Wend
BASS_Free()
FreeBank spectrum
End