Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Sound clip: when volume is set, it starts with a pop

2680797May 26 2014

I have searched and searched, and have not found the cause of my problem.

Setting: I am trying to play a list of clips in sequence indefinitely till the GUI of the program tells to stop. Also, the user can adjust the volume while the clips are being played. Let's say I have clips A, B and C. The sequence of play will be ABCABCABCABC.....

Problem: The problem is that the first time clips A, B and C start - there are POPs - after that for the GUI tells to stop, there are no POPs.

Code: In the run() method of the thread, get all filenames of the clips, create all clips and save them in a LinkedHashSet. Next, play these clips in loop, creating the volume control object for each.

My Observation: The offending lines are commented (with // TODO: UNCOMMENT ME!!!!!) With the commented lines, there are no POPs, but the volume control is disabled. When these lines are uncommented, the POPs return.

Question: Where am I going wrong? I don't have any hair on the head to pull out!

I am new for the community - and don't know how to post sample code.  Please guide me.

R/-

S.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 23 2014
Added on May 26 2014
0 comments
992 views