Click here to Skip to main content
15,922,315 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I just came across un4seen and I gave it a go using visual basic 2008.
I found a few tutorials but it's not working for reasons I do not know, because in the video it works. I've tried it twice. Could anyone tell me if I have missed something or if there are other tutorials or sources out there?
This guy does it but it's in German and it works perfect for him:
http://www.youtube.com/embed/XWg5oazzRSk

Thanks

VB
Imports Un4seen.Bass
Public Class Form1
Public stream As Integer

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Bass.BASS_Init(+1, 44100, BASSInit.BASS_DEVICE_CPSPEAKERS, IntPtr.Zero, Nothing)

End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim open As New OpenFileDialog
If open.ShowDialog = Windows.Forms.DialogResult.OK Then
TextBox1.Text = open.FileName


End If
End Sub

Public Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
stream = Bass.BASS_StreamCreateFile(TextBox1.Text, 0, 0, BASSFlag.BASS_STREAM_AUTOFREE Or BASSFlag.BASS_STREAM_PRESCAN)
Bass.BASS_ChannelPlay(stream, False)

End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Bass.BASS_ChannelStop(stream)
End Sub

Public spectrem As New Un4seen.Bass.Misc.Visuals
Public peek(2) As Single

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Bass.BASS_ChannelGetLevel(stream, peek)
Dim ProgressBar2_value As Integer = (Math.Round(peek(1), 3) = 100)
Dim ProgressBar1_value As Integer = (Math.Round(peek(2), 3) = 100)
ProgressBar2.Value = ProgressBar2_value
ProgressBar1.Value = ProgressBar1_value

PictureBox1.Image = spectrem.CreateSpectrumLine(stream, PictureBox1.Width, PictureBox1.Height, Color.CornflowerBlue, Color.HotPink, Color.Black, 0, 5, False, True, True)

End Sub

End Class


[kschuler - Edited for spelling, etc. and added code block]
Posted
Updated 18-Aug-11 6:00am
v2
Comments
Kschuler 18-Aug-11 12:01pm    
When you say it isn't working, are you getting an error? If so, what is the error message?

1 solution

It's etremely unlikely anyone here is going to know anything about that library. Your best source of information is going to be the Forums link at http://www.un4seen.com[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900