1. wxEuphoria sound

Hello everybody,

I wrote a sound test:

--sound_test.exw 
 
include wxeu/wxeud.e 
 
atom s, x 
 
s = create( wxSound, {"minewinner.wav"}) 
 
x = sound_play (s, wxSOUND_ASYNC) 

ex.err:

/usr/share/euphoria/include/wxeu/wxeud.e:6327 in function create() c_proc/c_func: bad routine number (-1) class = 111'o' params = { {109'm',105'i',110'n',101'e',119'w',105'i',110'n',110'n', 101'e',114'r',46'.',119'w',97'a',118'v'} } rid = -1 .....

(with mines.exw is the same)

How can I to hear it?

Thanks, Attila Kondor

new topic     » topic index » view message » categorize

2. Re: wxEuphoria sound

You've gotta use sound_create() at some point, I suspect.

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

3. Re: wxEuphoria sound

--sound_test.exw 
 
include wxeu/wxeud.e 
 
atom x, void, sound 
 
--s = create( wxSound, {"minewinner.wav"})  
--in /demo/mines.exw:   
--         sndWinner = create( wxSound, {"resources/minewinner.wav"}) 
 
s = sound_create( sound, "minewinner.wav", 1) 
  --variable sound has not been assigned a value  
   
x = sound_play (s, wxSOUND_ASYNC) 

I think sound_create is not required, the wav file is already.

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

4. Re: wxEuphoria sound

OK, I looked at the mines.exw sample and you seem to be right. Does mines.exw makes a noise for you if you win/lose?

It makes the noises for me.

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

5. Re: wxEuphoria sound

for me just ex.err:

/usr/share/euphoria/include/wxeu/wxeud.e:6327 in function create() c_proc/c_func: bad routine number (-1) class = 111'o' params = { {114'r',101'e',115's',111'o',117'u',114'r',99'c',101'e',115's', 47'/',109'm',105'i',110'n',101'e',108'l',111'o',115's',101'e',114'r',46'.', 119'w',97'a',118'v'} } rid = -1

... called from /home/kondor/EuphWork/euphoria/wxEu17/demo/mines.exw:88

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

6. Re: wxEuphoria sound

Looking at wxeud.e ( at http://wxeuphoria.svn.sourceforge.net/viewvc/wxeuphoria/wxeu/trunk/wxeud.e?view=markup&pathrev=546 ) it seems to me that for some reason the wxEuphoria Euphoria code can't find the new_wxSound() C function in the wxEuphoria C cod shared library.

I wonder if it should be using WX_SOUND_CREATE instead.

Kondor_Attila said...

for me just ex.err:

/usr/share/euphoria/include/wxeu/wxeud.e:6327 in function create() c_proc/c_func: bad routine number (-1) class = 111'o' params = { {114'r',101'e',115's',111'o',117'u',114'r',99'c',101'e',115's', 47'/',109'm',105'i',110'n',101'e',108'l',111'o',115's',101'e',114'r',46'.', 119'w',97'a',118'v'} } rid = -1

... called from /home/kondor/EuphWork/euphoria/wxEu17/demo/mines.exw:88

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

7. Re: wxEuphoria sound

I have been download this wxeud.e (936.7 kB), I overwrote it. The ex.err remain.

/usr/share/euphoria/include/wxeu/wxeud.e:6327 in function create() c_proc/c_func: bad routine number (-1) class = 111'o' params = { {114'r',101'e',115's',111'o',117'u',114'r',99'c',101'e',115's', 47'/',109'm',105'i',110'n',101'e',108'l',111'o',115's',101'e',114'r',46'.', 119'w',97'a',118'v'} } rid = -1

... called from /home/kondor/EuphWork/euphoria/wxEuphoria/demo/mines.exw:88

Tanks, Attila Kondor

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

8. Re: wxEuphoria sound

Kondor_Attila said...

I have been download this wxeud.e (936.7 kB), I overwrote it. The ex.err remain.

That is exactly what I expected to have happened.

Kondor_Attila said...

/usr/share/euphoria/include/wxeu/wxeud.e:6327 in function create() c_proc/c_func: bad routine number (-1) class = 111'o' params = { {114'r',101'e',115's',111'o',117'u',114'r',99'c',101'e',115's', 47'/',109'm',105'i',110'n',101'e',108'l',111'o',115's',101'e',114'r',46'.', 119'w',97'a',118'v'} } rid = -1

... called from /home/kondor/EuphWork/euphoria/wxEuphoria/demo/mines.exw:88

Tanks, Attila Kondor

I'm not that experienced with wxEuphoria, but do you get any "Failed to link" messages if you turn on debugging? (You can do so by adding a "with define DEBUG" at the top of wxeud.e )

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

9. Re: wxEuphoria sound

Hello!

I did write:

with define DEBUG

/* /makedoc title wxEuphoria Documentation ....

The ex.err remain the same: (just 6327 -> 6328)

/usr/share/euphoria/include/wxeu/wxeud.e:6328 in function create() c_proc/c_func: bad routine number (-1) class = 111'o' params = { {114'r',101'e',115's',111'o',117'u',114'r',99'c',101'e',115's', 47'/',109'm',105'i',110'n',101'e',108'l',111'o',115's',101'e',114'r',46'.', 119'w',97'a',118'v'} } rid = -1

... called from /home/kondor/EuphWork/euphoria/wxEu17/demo/mines.exw:88

Thanks, Attila Kondor

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

10. Re: wxEuphoria sound

Your reply is a little ambiguous. Just to be perfectly clear, when you run this, with the edit to add "with define DEBUG", you do not see any "Failed to link" likes?

Note that these will not show up in ex.err, they will only show in the console window.

Kondor_Attila said...

Hello!

I did write:

with define DEBUG

/* /makedoc title wxEuphoria Documentation ....

The ex.err remain the same: (just 6327 -> 6328)

/usr/share/euphoria/include/wxeu/wxeud.e:6328 in function create() c_proc/c_func: bad routine number (-1) class = 111'o' params = { {114'r',101'e',115's',111'o',117'u',114'r',99'c',101'e',115's', 47'/',109'm',105'i',110'n',101'e',108'l',111'o',115's',101'e',114'r',46'.', 119'w',97'a',118'v'} } rid = -1

... called from /home/kondor/EuphWork/euphoria/wxEu17/demo/mines.exw:88

Thanks, Attila Kondor

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

11. Re: wxEuphoria sound

Kondor_Attila said...

I wrote a sound test:

...

How can I to hear it?

The wxSound object relies on wxMediaCtrl. On Linux, I believe this relies on GStreamer. The wxWidgets libraries supplied by Ubuntu did not include wxMediaCtrl support (I'm guessing due to the dependency, but I really don't know). wxEuphoria should probably handle this better, or at least give you an easier way to discover what's going on.

When you build wxWidgets, there are a ton of configuration options.

Matt

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

12. Re: wxEuphoria sound

Hello! I started in gnome-commander. Now in terminal:

kondor@P5Q:~/EuphWork/euphoria/wxEu17/demo$ eui mines.exw 
Failed to link function: display_change_mode 
Failed to link function: display_get_client_area 
Failed to link function: display_get_count 
Failed to link function: display_get_current_mode 
Failed to link function: display_get_from_point 
Failed to link function: display_get_from_window 
Failed to link function: display_get_geometry 
Failed to link function: display_get_modes 
Failed to link function: display_get_name 
Failed to link function: display_is_primary 
Failed to link function: get_media_length 
Failed to link function: get_media_position 
Failed to link function: get_media_state 
Failed to link function: get_media_volume 
Failed to link function: load_media_uri 
Failed to link function: load_media 
Failed to link function: new_wxDisplay 
Failed to link function: new_wxMediaCtrl 
Failed to link function: new_wxSound 
Failed to link function: pause_media 
Failed to link function: play_media 
Failed to link procedure: seek_media 
Failed to link function: set_media_volume 
Failed to link function: show_player_controls 
Failed to link function: sound_create 
Failed to link function: sound_is_ok 
Failed to link function: sound_play 
Failed to link procedure: sound_stop 
Failed to link function: stop_media 
 
/usr/share/euphoria/include/wxeu/wxeud.e:6328 in function create()  
c_proc/c_func: bad routine number (-1)  
 
... called from /home/kondor/EuphWork/euphoria/wxEu17/demo/mines.exw:88  
 
> See ex.err  
Thanks! Attila

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

13. Re: wxEuphoria sound

Looks like Matt is correct. You'll need to update your wxWidgets library in order to add sound support through wxMediaCtrl to it before you can use wxEuphoria to play sounds.

Kondor_Attila said...

Hello! I started in gnome-commander. Now in terminal: kondor@P5Q:/EuphWork/euphoria/wxEu17/demo$ eui mines.exw Failed to link function: display_change_mode Failed to link function: display_get_client_area Failed to link function: display_get_count Failed to link function: display_get_current_mode Failed to link function: display_get_from_point Failed to link function: display_get_from_window Failed to link function: display_get_geometry Failed to link function: display_get_modes Failed to link function: display_get_name Failed to link function: display_is_primary Failed to link function: get_media_length Failed to link function: get_media_position Failed to link function: get_media_state Failed to link function: get_media_volume Failed to link function: load_media_uri Failed to link function: load_media Failed to link function: new_wxDisplay Failed to link function: new_wxMediaCtrl Failed to link function: new_wxSound Failed to link function: pause_media Failed to link function: play_media Failed to link procedure: seek_media Failed to link function: set_media_volume Failed to link function: show_player_controls Failed to link function: sound_create Failed to link function: sound_is_ok Failed to link function: sound_play Failed to link procedure: sound_stop Failed to link function: stop_media

/usr/share/euphoria/include/wxeu/wxeud.e:6328 in function create() c_proc/c_func: bad routine number (-1)

... called from /home/kondor/EuphWork/euphoria/wxEu17/demo/mines.exw:88

See ex.err

Thanks! Attila

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

14. Re: wxEuphoria sound

I can just resettle with Synaptic

wxformbuilder, libwxgtk2.8-0, wx2.8-i18n, wx2.8-headers, wx2.8-examples, wx-common, libwxgtk2.8-dev, libwxbase2.8-0, libwxbase2.8-dev

How can I do wxMediaCtl set?

Thanks, Attila Kondor

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

Search



Quick Links

User menu

Not signed in.

Misc Menu