PDA

View Full Version : An interesting observation with SoundMixer


Assertnfailure
10-12-2006, 10:33 PM
So as you may or may not know, SoundMixer is a static class introduced with AS 3.0 for global control over sound. Well, my friend and I have been playing with the computeSpectrum() method for SoundMixer and discovered something interesting....it picks up sound from OTHER swfs running on the same machine as well. It seems like a localconnection type of interactivity, but as far as I know the external swfs that were causing the conflict weren't specifically programmed to transmit sound data via localconnection. Is this due to a hardware level interaction with the sound card that all swfs share for such methods?

I had previously envisioned the potential of computeSpectrum expanding the horizons of possibilities...with crazy ideas like building games where the level might shift or shake based on specific frequencies of a song playing, but would this global merging of sound data allow a doorway for cheaters to beat such games through means of introducing their own music via external swfs? :p

Assertnfailure
10-12-2006, 10:42 PM
Er hmm.......I seem to only be getting it with the myspace mp3 player....
perhaps they do use localconnection afterall?

Still pretty trippy

Assertnfailure
10-25-2006, 09:26 PM
Persisting issues.....

A friend of mine discovered that if he checks out a swf of mine that implements computeSpectrum while simultaneously having youtube open, he gets security violations of my swf trying to crossdomain to youtube. This must reinforce my claim that computeSpectrum takes place on a more hardware level that is shared by all instances of the flash player.

I guess this means I have to set up security error handlers any time I use the SoundMixer now...

Assertnfailure
10-26-2006, 02:59 AM
Ok good news and bad news.....

good news: I've isolated the problem. It appears you need to call SoundMixer.areSoundsInaccessible() before attempting to compute spectrum. It will return true if a conflict is present and seems to be the closest thing to catching a security error from SoundMixer's end.

bad news: If it returns true, you pretty much have no option but to skip calling SoundMixer.computeSpectrum()...there's simply no way to get spectral data as long as another swf without an open cross-domain policy is running on your computer. :(

Flash Gordon
08-08-2008, 09:19 PM
It's a shame this still isn't fixed. RETARDED!!!!!!!!!!

lordofduct
08-08-2008, 09:26 PM
gimp, I did not know this!

I've been playing with SoundMixer a lot, but never tested it under these kinds of conditions.

Thanks for the good information.