Re: Bass Library?

new topic     » goto parent     » topic index » view thread      » older message » newer message

hello thanks well i did made an attempt to convert the C/Cpp bass library header into a euphoria header (.e file) and then test it but i cheated to make a shortcut i used chatGPT to slowly convert the header from C/Cpp to euphoria each time a slice of the code (some 250 - 300 lines chunk each time)the result is a buggy header since GPT doesn't know well euphoria nor is accurate to-be-honest... but here is the code of the header I'm using "pastey" and also bringing the bassTest file i made converted from freebasic to euphoria...

include bass.e 
-- Call this once at the beginning of the program 
if BASS_GetVersion() < MAKELONG(2, 2) then 
    puts(1, "BASS version 2.2 or above required!") 
end if 
if BASS_Init(-1, 44100, 0, 0, 0) = 0 then 
    puts(1, "Could not initialize BASS") 
end if 
global HMUSIC g_BackgroundMusic 
procedure stopMusic(music) 
    if music = 0 then music = g_BackgroundMusic end if 
    if music then BASS_ChannelStop(music) 
end procedure 
procedure freeMusic(music) 
    if music = 0 then music = g_BackgroundMusic : g_BackgroundMusic = 0 end if 
    if music then BASS_MusicFree(music) 
end procedure 
function playMusic(soundfile) 
    if g_BackgroundMusic then  
        g_BackgroundMusic = 0 
    end if 
    object music = BASS_StreamCreateFile(0, soundfile, 0, 0, 0) 
    if music then  
        g_BackgroundMusic = music 
        BASS_ChannelPlay(music, 0) 
    end if 
    return music 
end function 
puts(1,"playing the test music file - mp3") 
puts(1,"\n\ntest completed") 

the error I'm getting is :

<0076>:: expected to see an assignment after 'define', such as =, +=, -=, *=, /= or &= 
    type HMUSIC = atom,   -- MOD music handle 
Press Enter 

here is bass.e header code from pastey:

new topic     » goto parent     » topic index » view thread      » older message » newer message


Quick Links

User menu

Not signed in.

Misc Menu