Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


[java] Memory Leak In JDK 1.3 javax.sound.sample?

This topic is 6135 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Has anyone experiences with the javax.sound.sample classes? I''m trying to implement sample streaming from a file (for game background music etc.) for my GameFrame for Java library and I''ve encountered a disturbing problem. I setup a SourceDataLine to accept the PCM data I read with a self made sample file reader. Otherwise the thing works just fine, the sample plays, but the Runtime.getRuntime().totalMemory() shows that the memory need of the runtime grows quite rapidly and after a minute or so playing the 44,1KHz, 16-bit, stereo sample the program terminates with java.lang.OutOfMemoryError. Does anyone have an insight what might be causing this? I''ve taken great care to avoid any memory reservations in my code that does the reading of the file and moving of the data from the file input stream into the sample output stream.

Share this post

Link to post
Share on other sites
Oh well, found the bug in Bug Parade:
Bug Id: 4327019
Votes: 21
Synopsis: long running 8 Khz, 8-bit sound app runs out of memory
Category: java:classes_sound
Reported Against: kestrel, merlin-beta
Release Fixed: -
State: In progress, bug
Related Bugs: -
Submit Date: Mar 31, 2000

Description: Long running 8 Khz, 8-bit sound app runs out of memory using the Java Sound 1.0 API in JMF 2.0.

Workaround None.

We should try to fix this for ladybird (1.3.1) and JMF 2.1.

No sound resource at the moment to do this for ladybird. Decommitting for ladybird and committing for merlin.

In plain English, they never tested for sound streaming even though they implemented sound streaming API . This also means that my JDK 1.3 sound engine can''t support sample streaming, luckily the man''s best friend Microsoft has implemented their DirectSound to Java mappings adequately so I can implement it under that platform

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!