Today I've started to work on Localhero again and it uses some sounds as a communication. It doesn't work anymore (possibly all sounds now go through customsounds.plist?) and using
this.s = new SoundSource;
this.s.sound = "hit.ogg";
this.s; // should print sound info
this.s.play();
Svengali wrote:
BTW: Declaring the same KEY in different plists (descriptions and customsounds) also crashes Oolite
You mean putting “foo = x;” in descriptions.plist and “foo = y;” in customsounds.plist? I’m sorry, but I find this quite hard to believe. I think you’ve misdiagnosed the cause of the problem. I suspect you’ll find that one of the key/value pairs is causing the problem, probably due to a formatting error. (Breaking descriptions.plist will cause Oolite to fail to load.)
this.s = new SoundSource;
this.s.sound = "hit.ogg";
this.s; // should print sound info
this.s.play();
This works, it gets the right OO-Class, the right sound and plays it correctly. I'll test it a little bit more, because on the first try sound was nil, the other 5 times everything was ok. I've also tried it with other sounds and that was working very well. Muchas gracias, Ahruman.
Edit: Tried it a few more times and everything works with this way. The first time was propably a somehow confused JS-Engine, because of the problems before. playSound crashes like before.
Ahruman wrote:
Svengali wrote:
BTW: Declaring the same KEY in different plists (descriptions and customsounds) also crashes Oolite
You mean putting “foo = x;” in descriptions.plist and “foo = y;” in customsounds.plist? I’m sorry, but I find this quite hard to believe. I think you’ve misdiagnosed the cause of the problem. I suspect you’ll find that one of the key/value pairs is causing the problem, probably due to a formatting error. (Breaking descriptions.plist will cause Oolite to fail to load.)
Probably you are right :-) I'm often playing with these things to see what happens if someone does it by accident and to understand Oolite a little bit better.
Edit: Tried it also and failed to repeat the crash.
The initial case reported by Svengali works for me in the trunk/maintenance versions, crashes on the 1.72 release. As I seem to recall, the bug was probably corrected at the time of the mute trumbles fix.
The initial case reported by Svengali works for me in the trunk/maintenance versions, crashes on the 1.72 release. As I seem to recall, the bug was probably corrected at the time of the mute trumbles fix.