CodecJorbis, Bug-Fix
- Fixed a bug where certain types of .ogg files created in versions of Audacity were cut off just before the end of the sample.
CodecJorbis, Bug-Fix
- Fixed a bug where certain types of .ogg files created in versions of Audacity were cut off just before the end of the sample.
Hi!
The sounds that I use are played correctly the first time I play them but after that, I hear nothing I’m going to update the library and check if I reproduce this problem when my webcam is not plugged.
When I stop playing a sound (especially the introduction sample), it fails, it goes on playing it until the end.
That’s a new one. What is your OS, 32/64 bit, Java version, etc? I’m sure you’ve told me before, but the thread has gotten so long that I can’t seem to find it. Let me know if it is related to the webcam. I’ll try and reproduce it here if I can.
Mandriva Linux 2010, 32 bits, Oracle Java 1.6 update 22. I have not tested with OpenJDK. I’m going to test it with the latest version of your library in some hours.
Ok I confirm that the bug is reproducible only when the webcam is used because it uses another mixer. It is not important, don’t worry. I’m impatient to use your low-latency software mixer Thank you for your good work
[quote=“gouessej,post:105,topic:33341”]
I’ve written a native software mixer for the Android (or rather I’ve hijacked one from someone else’s code and ported it to the NDK ;D ). That has helped me quite a bit with understanding what all is involved. I’m still in the process of taking that knowledge and translating it into something usable in Java, though.
Do you use OpenSL ES or OpenMAX on Android to do this? Is the use of native code mandatory to write such a software mixer?
I have to write this report about my problem of webcam. It would be fine if it was fixed in Java 1.7.
The mixing is done purely by c code. The code is taken from the open-source SDL software mixer. The output data is passed in buffers through an interface method into Java where it is played through an AudioTrack instance.
Ok I see what you mean. When you port this code to the desktop, will you keep all this C code? Is it a pure utopia to imagine a pure Java software mixer? SFML has a nice software mixer, maybe you could look at it too.
Well, I’m attempting to port it to pure Java (somewhat difficult to deal with the whole pointers vs Objects issue). If this fails or turns out to simply be too slow, I may have to go with native code in the end (I hope not). If that happens, I will modify LWJGL’s AppletLoader so that it deploys the necessary natives (which will make using the library in Applets easier, but will of course still require the end user to accept the digital signature).
What are the bottlenecks? What could be noticeably slower in Java?
Well, I was just talking in general terms, since I have not actually finished the port yet. I meant that Java, as an interpreted runtime environment, trades some amount of speed for its portability. For the most part, this isn’t a problem (the fact that there are pure-java 3D engines is proof of that). Audio data manipulation and mixing is rather math-intensive, so it remains to be seen if a straight port from native code will run fast enough, or if it will require additional optimizations.
Ok. Maybe you could use JOCL even to perform computations on the CPU to benefit of features that are not exposed in Java, it would avoid to write native code.
I have looked a bit at the sound system of SFML. Actually, even the software renderer relies on OpenAL.
I have submitted a bug report there, it will be visible in some days:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7006285
Lol even the official demo of JavaSound crashes when I plug my webcam in :o
Firstly I’d like to say I think this sound system is great :).
Secondary I’ve encountered an issue with playing .ogg files that are of a small size (for instance 13kb). I can play it in another media player (Winamp for example) but not using the sound system. When I change the file to a larger sized .ogg (a track of size 500kb) it works fine. Is there a lower size limit for use of .ogg?
I encounter this issue using LibraryLWJGLOpenAL.class and LibraryJavaSound.class whilst I have also tried CodecJOrbis.class and CodecJOgg. Any ideas?
EDIT: It also works with .ogg of file size 184kb. So I guess there may be a lower size limit?
Do you use the latest version? I use tiny ogg files with JavaSound and it works fine. Do you use the streaming?
Thanks for a reply. I am using the versions from the first post. I’m using the assumption that these are the newest (as a lot of people tend to re-edit their first post with the links). I’ve tried it with both newSource(…) and newStreamingSource(…) methods.
boolean priority = false;
String sourcename = "Source 1";
String filename = "/sound/badge.ogg"; // this is stored in a package Sounds.sound and other files work fine like this.
boolean loop = false;
float x = 0;
float y = 0;
float z = 0;
int aModel = SoundSystemConfig.ATTENUATION_ROLLOFF;
float rFactor = SoundSystemConfig.getDefaultRolloff();
soundSystem.newStreamingSource( priority, sourcename, filename, loop, x, y, z, aModel, rFactor );
soundSystem.play( "Source 1" );
EDIT: I ultimately want to use fades and I noticed you can only use fades with SteamingSources so says the console info
I don’t use streaming and I succeed in playing very short ogg files but that is not what you want to do :s
Thanks for the info. It doesn’t work for me even when I don’t use streaming. What file size is the smallest ogg file you use?
This one:
http://tuer.svn.sourceforge.net/viewvc/tuer/pre_beta/sounds/teleporter_use.ogg?view=log
Look at my repository to be sure we use the same version of his sound engine.