PE Client Inter-Plugin Communication

Post Reply
matt
Posts: 51
Joined: Tue Dec 27, 2011 11:40 pm
Location: San Jose, CA

PE Client Inter-Plugin Communication

Post by matt »

Is there an inter-plugin communication SDK for the PE Client, similar to VATSIM's? I like listening to music while flying, so I have written an X-Plane plugin (for use with the VATSIM plugin) to act like an intercom controller; when I am talking on the radio or when receiving a transmutation, playing music is muted. This is accomplished by watching for radio activity notifications coming from the VATSIM plugin. Anyway, I would like to do this with PE since I am flying on PE pretty much exclusivley now.

Thanks,

Matt
Keith Smith
Posts: 9939
Joined: Sat Oct 09, 2010 8:38 pm
Location: Pompton Plains, NJ
Contact:

Re: PE Client Inter-Plugin Communication

Post by Keith Smith »

Hi Matt,

Actually, intercoms with music input normally only mute if there is a transmission on the intercom (ie, pilots/passengers are speaking, or pilot/co-pilot transmitting on the radio). When someone else (ATC or another aircraft) transmits on the radio, that is played over the intercom, but does NOT mute the music.

If you'd like to replicate that, then you simply need to capture the begin and end of the push to talk event. You can register a command handler for the 'Contact ATC' function in X-Plane to trap this event in your plugin and mute the music accordingly.

VATSIM's XSB plugin has its own routine for handling the push to talk event. I consciously decided to simply override an existing action in X-Plane (in this case, 'Contact ATC'). This allows you to do the same thing, without needing to interact with the PE plugin itself.

Edit: check the 4min 30sec mark of this video to see what I mean about intercom operation as it relates to muting of the aux input.

Keith
matt
Posts: 51
Joined: Tue Dec 27, 2011 11:40 pm
Location: San Jose, CA

Re: PE Client Inter-Plugin Communication

Post by matt »

Keith Smith wrote:Hi Matt,

Actually, intercoms with music input normally only mute if there is a transmission on the intercom (ie, pilots/passengers are speaking, or pilot/co-pilot transmitting on the radio). When someone else (ATC or another aircraft) transmits on the radio, that is played over the intercom, but does NOT mute the music.

If you'd like to replicate that, then you simply need to capture the begin and end of the push to talk event. You can register a command handler for the 'Contact ATC' function in X-Plane to trap this event in your plugin and mute the music accordingly.

VATSIM's XSB plugin has its own routine for handling the push to talk event. I consciously decided to simply override an existing action in X-Plane (in this case, 'Contact ATC'). This allows you to do the same thing, without needing to interact with the PE plugin itself.

Keith
Thanks for the reply Keith. Thats exactly what I was looking at (the Contact ATC button), however my only problem is cutting off the music audio while receiving a transmission over the radio. Without doing that, I wouldn't be able to hear the radio call over the music. I was looking at the XP data refs and can't find one for a RX on the com radio (I would guess that would have to be reported by the PE Client anyway). I guess I will start reading the CoreAudio documentation and simulate a true intercom system. Thats the right way to do it and the way I should have done it to start with, but I was just lazy and threw something together quick.

Thanks again,

Matt
Keith Smith
Posts: 9939
Joined: Sat Oct 09, 2010 8:38 pm
Location: Pompton Plains, NJ
Contact:

Re: PE Client Inter-Plugin Communication

Post by Keith Smith »

Matt, it's unnecessary to cut the music off to hear the ATC transmission, as you see from the video that I posted. Pilots normally set the music and ATC volume such that the ATC transmission can still be heard over the top of the music.

I would be livid if the music cut out every time, because I've flown through some airspace where the radio is going non-stop :)
matt
Posts: 51
Joined: Tue Dec 27, 2011 11:40 pm
Location: San Jose, CA

Re: PE Client Inter-Plugin Communication

Post by matt »

Keith Smith wrote:Matt, it's unnecessary to cut the music off to hear the ATC transmission, as you see from the video that I posted. Pilots normally set the music and ATC volume such that the ATC transmission can still be heard over the top of the music.

I would be livid if the music cut out every time, because I've flown through some airspace where the radio is going non-stop :)
Hehe, true, that is annoying. With my current setup with both music and radio traffic going, its like trying to listen to someone talk at a concert. After reading the CoreAudio documentation, I just might make a kick butt intercom fading down the music just enough to hear the radio traffic and fading it back up. I'm looking for a new side project anyway.
Keith Smith
Posts: 9939
Joined: Sat Oct 09, 2010 8:38 pm
Location: Pompton Plains, NJ
Contact:

Re: PE Client Inter-Plugin Communication

Post by Keith Smith »

Matt,

If you have a specific requirement for the PE to give some sort of alert as to when audio is being received, I can find a way to make that happen. I was only commenting on the real world operation of an intercom to clear up any misconception about how they actually work. If, however, you still want to take some sort of action when a transmission arrives, I should be able to help with that, but it might be a little while.
matt
Posts: 51
Joined: Tue Dec 27, 2011 11:40 pm
Location: San Jose, CA

Re: PE Client Inter-Plugin Communication

Post by matt »

Keith Smith wrote:Matt,

If you have a specific requirement for the PE to give some sort of alert as to when audio is being received, I can find a way to make that happen. I was only commenting on the real world operation of an intercom to clear up any misconception about how they actually work. If, however, you still want to take some sort of action when a transmission arrives, I should be able to help with that, but it might be a little while.
Keith,

That would be awesome and greatly appreciated! I'm happy to hear that you can setup a real world intercom system where the music is not just dumped while the radio has a traffic. The only real world flying I have experienced is in helicopters and intercom system (weather it was correctly setup or not) in the ship always let the internal intercom and radio take primary over the iPod (music input). So, like you said, it was annoying to cut off every time there was intercom/radio activity. Especially when having a lengthy conversation makes you pause the music until your done!

Thanks again,

Matt
Post Reply