Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
heres another one
#1
as copied from fmodtest
Code:
Const MusicFile = "dne_trtn.mod"
    Dim Shared Handle As Long


    If FSOUND_GetVersion <= FMOD_VERSION Then
          ErrorQuit "FMOD version " + STR$(FMOD_VERSION) + " or greater required"
    End If

    If FSOUND_Init(44100, 32, 0) = FALSE Then
          ErrorQuit "Can't initialize FMOD"
    End If

    Handle = FMUSIC_LoadSong(MusicFile)
    If Handle = FALSE Then
          ErrorQuit "Can't load music file " + CHR$(34) + MusicFile + CHR$(34)
    End if

    FMUSIC_PlaySong(Handle)

    Print "FMOD test for freeBASIC"
    Print
    Print "(press any key to quit)"

    Sleep

    FMUSIC_FreeSong(Handle)
    FSOUND_Close

    End

ok in my program i have this i know its not right but how do i fix this

if lev=1 then Const MusicFile = "l1.mid"
if lev=2 then const musicfile="l2.mid"

i get the error message duplicated definition musicfile
i know that it being a const its saying that there can only be one definition even though its within the if statement so how do i get it to accept both when lev=1 i want it to play l1.mid and when lev=2 play l2.mid??
o live is to die, to die is to expel, to expel is to exist is to live without knowing to be
Reply


Messages In This Thread
heres another one - by MNDRBNDR - 02-17-2005, 12:29 AM
heres another one - by adosorken - 02-17-2005, 01:10 AM
midi in fmod - by MNDRBNDR - 02-17-2005, 01:12 AM
heres another one - by adosorken - 02-17-2005, 01:13 AM
midi in fmod - by MNDRBNDR - 02-17-2005, 01:15 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)