Project

General

Profile

Confused about WSound class.

Added by ivan jobs over 14 years ago

Hi guys,

Recently I'm really stick with the WSound class, it don't sound anyway.

According to the class reference, I declared a WSound class like this: WSound *wordSound; in my class.

And then I initialized it in the constructor like this: wordSound = new WSound("abolish.mp3"); Then I wrote a function called soundIt:

void TrainingWidget::soundIt()

{

wordSound->play();

}

At last, I connected my widget's button's clicked signal to this function.

When I click the button, it did not sound any way. Why?

I thought maybe the reference is wrong. I looked into "SimpleChat" example and found another way of using WSound class with declaration like this: WSound wordsound;

but it still did not make any sound. I am really confused. Please help me. Thanks a lot.


Replies (2)

RE: Confused about WSound class. - Added by Wim Dumon over 14 years ago

WSound uses a little flash helper to play sounds. Did you deploy the 'resources' folder? Do you see 404s in your log? Is WtSoundManager.swf requested by the browser?

BR,

Wim.

RE: Confused about WSound class. - Added by ivan jobs over 14 years ago

Hi Wim,

You tips are really helpful. I forgot to deploy the "resources" folder. Thanks :).

    (1-2/2)