Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Is there no way to direct an AIR app's audio to different audio output devices?

Explorer ,
Mar 25, 2014 Mar 25, 2014

I'm needing to make a couple of our AIR apps select certain audio devices to send their audio output to, and last year, somebody mentioned possibly using native extensions to do this.  I had to start working on other things for a while, but I've come back to this (for the moment), and I've basically learned how to create native extensions.

But so far, they don't seem to provide me any special access to anything going on under the hood of an AIR app.  When you stream live audio in through RTMP or RTMFP, the details of the audio are hidden from you.  There doesn't appear to be any place where you can actually access the audio bytes that are being sent over the wire.  You can specify a certain SoundTransform object for the NetStream to use, but that class is final and a vanilla Flash construct, so even if it may have a way to access the audio bytes, they're not acessible at all.

It really looks like, when a NetStream object starts streaming in live audio, there is no way under the sun to access the audio bytes and direct them to a certain audio output device, with or without extensions.  Is this so?  It would be unfortunate if Adobe didn't allow this, even through native extensions.  Thanks.

TOPICS
ActionScript
654
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Mar 25, 2014 Mar 25, 2014

Couple quick thoughts..

Limits are important. There's a large amount of work done to keep a clear separation between a users decision and a developers decision. For instance, you can't change a users default audio output because that clearly violates a users decision. That said, here's a whole mess of people debating the issue and actually eventually an undocumented COM API you can find that will actually let you do it in Vista/Win7 (but not 8), however don't expect that to be a 'good thing to d

...
Translate
LEGEND ,
Mar 25, 2014 Mar 25, 2014

Couple quick thoughts..

Limits are important. There's a large amount of work done to keep a clear separation between a users decision and a developers decision. For instance, you can't change a users default audio output because that clearly violates a users decision. That said, here's a whole mess of people debating the issue and actually eventually an undocumented COM API you can find that will actually let you do it in Vista/Win7 (but not 8), however don't expect that to be a 'good thing to do':

http://social.microsoft.com/Forums/en-US/9ebd7ad6-a460-4a28-9de9-2af63fd4a13e/programatically-settin...

You might want to get a beverage before reading that.

Aside that, RTMP is secured, which is why you can't gain access to the bytes. The entire purpose of it is to assure media developers that their media can't easily be copied/stolen. Adobe doesn't document their method of securing streams but they do publish the RTMP specification. It's entirely possible for you to create your own RTMP server and encryption method while delivering a RTMP stream to custom client that you code yourself which can read the stream. Here's the spec:

http://www.adobe.com/devnet/rtmp.html

So I'd say it would be unfortunate if Adobe did give you access to the bytes. You might as well just hand users a mp3 of whatever song is playing because they would steal media left and right.

That isn't to say you can't use a multitude of ways of getting the data going across the default output device. Plenty of apps (fraps/etc) capture video and mixed audio streams. But Adobe isn't going to give you the keys to the kingdom and let you decrypt their protected media protocol.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 26, 2014 Mar 26, 2014

Alright.  Thanks, sinious.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 26, 2014 Mar 26, 2014
LATEST

You're welcome and good luck!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines