23 May '13 - 18:37 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Reply  |  Print  
Author Topic: Bass.NET Problem  (Read 556 times)
Josefine
Guest
« on: 6 Jun '09 - 20:22 »
Reply with quoteQuote

Imports Un4seen.Bass
Public Class Form1

    Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
        Bass.BASS_Stop()
        Bass.BASS_Free()
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        IO.File.WriteAllBytes(My.Computer.FileSystem.SpecialDirectories.Temp + "./test.xm", My.Resources.test)
        Bass.BASS_Init(0, 44100, BASSInit.BASS_DEVICE_DEFAULT)
        Bass.BASS_MusicLoad(My.Computer.FileSystem.SpecialDirectories.Temp + "./test.xm", 0, 0, BASSInit.BASS_DEVICE_DEFAULT)
        Bass.BASS_Start()
    End Sub
End Class

Can someone fix this code?
It doesnt work for me, this both lines:
        Bass.BASS_Init(0, 44100, BASSInit.BASS_DEVICE_DEFAULT)
        Bass.BASS_MusicLoad(My.Computer.FileSystem.SpecialDirectories.Temp + "./test.xm", 0, 0, BASSInit.BASS_DEVICE_DEFAULT)

Can someone try this code and fix it?
pls help  Embarrassed
Logged
Knight_Rider
Posts: 131


« Reply #1 on: 7 Jun '09 - 15:01 »
Reply with quoteQuote

I hate it if somebody doesn't exactly tell WHAT doesn't work Tongue
And which language -.-

But as I assume it's VB.Net:
My.Computer.FileSystem.SpecialDirectories.Temp + "./test.xm"
Why "./test.xm" and not  "\test.xm"?
Logged
JM-DG
Posts: 112


« Reply #2 on: 7 Jun '09 - 17:34 »
Reply with quoteQuote

It looks like he/she wants to access a xm which is situated in the previous folder... I guess  Smiley
Logged
Latch
Posts: 89


« Reply #3 on: 7 Jun '09 - 18:33 »
Reply with quoteQuote

It looks like he/she wants to access a xm which is situated in the previous folder... I guess  Smiley

Knight_rider is correct.  There should be no forward slashes.  Every Microsoft OS since DOS 1.0 uses backslashes.  The single dot should also not be there.  Its an OLD DOS reference which refers to the current folder and should not be used in code ANYWHERE.
Logged
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines