1. EuSFML2 Updated

Hello All,

I have updated my SFML 2 wrapper for Euphoria. It now supports SFML 2.4

http://www.rapideuphoria.com/uploads/eusfml2.zip - The link is here. It should be on the main site in a little while.

new topic     » topic index » view message » categorize

2. Re: EuSFML2 Updated

Hi

I downloaded the package, and ran it under Phix.

If you

--/* 
include std/machine.e 
--*/ 
include EuSys2.ew 
include EuGfx2.ew 

and

                integer eventType = peek4s(event) 
                integer code = peek4s(event+4) 
                integer alt = peek4s(event+8) 
                atom control = peek4s(event+14) 
                atom shift = peek4s(event+16) 
                atom system = peek4s(event+20) 

at the beginning of the executable programs, and

--/* 
include std/dll.e 
include std/machine.e 
--*/ 

at the beginning of the includes, and add

--SoundBuffer Functions 
atom C_DWORDLONG = C_DOUBLE 

on line 449 of EuAud2.ew, then it works with Phix. (Phix doesn't have a C_DWORDLONG or a C_LONGLONG)

Note the audio demo asks to load test.wav, but you supply test.wma, which eusfml2 does not seem to support.

Sound doesn't sound right yet, but I will fiddle more and let you know if it works

Cheers

Chris

new topic     » goto parent     » topic index » view message » categorize

3. Re: EuSFML2 Updated

Hi, in the audio demo (AudDemo.exw), you were looping round too quickly, and consequently you were trying to play the sound over and over too many times. If you add

integer played = 0 
 
--and 
        if played = 0  then 
            sfMusic_play(snd) 
            played = 1 
        end if 

Then it works fine

Cheers chris

new topic     » goto parent     » topic index » view message » categorize

4. Re: EuSFML2 Updated

ChrisB said...

Hi, in the audio demo (AudDemo.exw), you were looping round too quickly, and consequently you were trying to play the sound over and over too many times. If you add

integer played = 0 
 
--and 
        if played = 0  then 
            sfMusic_play(snd) 
            played = 1 
        end if 

Then it works fine

Cheers chris

Thanks. However whenever I try to run the Audio now demo now, I get an error saying machine level exception sfMusic_setVolume, line 200. I'm not sure why this is coming up. The code is correct.

 
public constant xsfMusic_setVolume = define_c_proc(aud,"sfMusic_setVolume",{C_POINTER,C_FLOAT}) 
 
public procedure sfMusic_setVolume(atom mus,atom vol) 
 
 c_proc(xsfMusic_setVolume,{mus,vol}) --this is line 200 
	 
end procedure 

I'm on Windows 7 Ultimate 64-bit. I assume its a bug, but I'm not sure what would be causing it.

new topic     » goto parent     » topic index » view message » categorize

5. Re: EuSFML2 Updated

Hi

Do the other demos still work, as under eu 4.05 I'm now getting a machine level exception (5) from sfWindow_isOpen() from all the demos? (Under 4.1, it doesn't tell me anything at all, just exits)

Just wondering, because changing the integers to atoms shouldn't make a blind bit of difference (changed them back, and it doesn't), unless the size of the number goes outside the integers range. At this point I usually give up trying to get these to work, and just go back to Phix. I think this is another example of Eu's inability to be consistent with loading of dlls.

Cheers

Chris

new topic     » goto parent     » topic index » view message » categorize

6. Re: EuSFML2 Updated

Hi

Actually it happens with any first call to the sfml library.

sfRenderWindow_create() is returning 0 - ie the window is not being created, and the application is not being initialised.

Cheers

Chris

new topic     » goto parent     » topic index » view message » categorize

7. Re: EuSFML2 Updated

Interesting. I'm still using Euphoria 4.0.5. All the other demos were working besides the audio demo. Perhaps I should make a Phix version? It wouldn't be too hard. When you put it like that, it seems like Phix is the true succesor to Euphoria.

new topic     » goto parent     » topic index » view message » categorize

8. Re: EuSFML2 Updated

Hi

See above.

Cheers

Chris

new topic     » goto parent     » topic index » view message » categorize

9. Re: EuSFML2 Updated

Hi

The other thing to note of course, is that it could be me. Some other people just running it on their systems would be nice.

Cheers

Chris

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu