NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/

Easy Java Simulations (2001- ) => Questions related to EJS => Topic started by: ahmedelshfie on June 22, 2010, 08:41:50 pm



Title: EJS version of Fourier Synthesis (You can hear the sound,too)
Post by: ahmedelshfie on June 22, 2010, 08:41:50 pm
Hello prof,,,little help   ???
I have problem with project Fourier Synthesis,is buttons when i run simulation and try stop again sound not stop
Stay running I'm talk about when i run by HTML so how i solve this problem i check code of buttons i think no have wrong
But really don't know where is wrong that make simulation not stop sounds when run by HTML
Thanks  


Title: Re: EJS version of Fourier Synthesis (You can hear the sound,too)
Post by: Fu-Kwun Hwang on June 22, 2010, 09:58:30 pm
I did try to look at your code, however, I can not find the problem. Sorry!


Title: Re: EJS version of Fourier Synthesis (You can hear the sound,too)
Post by: ahmedelshfie on June 22, 2010, 11:12:09 pm
I'm sure no have wrong in code i think may have relationship between jar file and HTML
For example when i run jar file and after use button reset sounds no stop but when i close EJS and close site your prof
Sounds stop so i think because jar file have like relationship between source code in EJS and jar sound that i save in _data
And jar file in your site because upload in site but about project code is all right no have any problem and run by EJS very well.
However is not problem i can post by language portages .
Thanks prof


Title: Re: EJS version of Fourier Synthesis (You can hear the sound,too)
Post by: Fu-Kwun Hwang on June 22, 2010, 11:50:42 pm
I was guessing:
It might due to some restriction browser communicate with operating system.
Normally, browser is not suppose to communicate with operating system directly.
The sound device is a hardware, so it need operating system to control the hardware.

However, I am not sure about it. And the code I used to generate sound was adopted from very old java version.
I did not study how it can be done with latest java version.
 


Title: Re: EJS version of Fourier Synthesis (You can hear the sound,too)
Post by: ahmedelshfie on June 23, 2010, 12:03:12 am
Thanks prof I'm sure like i said in last post not have any problem in code
And simulation work very well.
You the best  :D