TheWarsimmer Posted June 6, 2018 Posted June 6, 2018 Almost finished with my first big mission, and wanted to include audio for the radio so the player could easily know headings, speed, etc. The only problem is, once audio is played, you can no longer pause or compress time. I thought that deleting the MCU would help, but you can't object link to audio. I tried to deactivate it, that didn't work. I tried following page 156 in the manual and running a stop media command, but that does nothing as well. Could anyone help?
JimTM Posted June 6, 2018 Posted June 6, 2018 (edited) I'm not sure I understand what you want to do. Do you want to start an audio track, pause it, and then start it again where it left off? If that is the case, that is not possible as far as I know. When you play an audio track that you stopped, it starts again from the beginning. The example on pg. 156 starts an audio track, stops it, and then immediately restarts it from the beginning. The track plays three times in a row with a 100ms pause in between. Note that you need to provide an .mp3 for the example to work. I notice that you have multiple "audio" media translators in your screenshot above. Make sure that you do not have the same audio track in two or more of the media translators, otherwise, only the first of those duplicate tracks will play. Edited June 6, 2018 by JimTM 1
TheWarsimmer Posted June 6, 2018 Author Posted June 6, 2018 (edited) Ah, I should have been more clear. Each media translator is for a five second or so radio transmission, each unique and in mp3 format. They're triggered by way-points or certain events (and a subtitle along with it). It all works and plays fine at the correct times. No problem there. However, as soon as the first radio transmission plays, you lose your ability to pause or compress time in game for the remainder of the flight. I've tested it, and you are able to do these things just fine so long as there is no audio. As soon as the media translators are introduced, you lose the ability. Because I isolated the source of the problem, I assumed it was because they needed to be canceled or deactivated once played, because the game wouldn't let you pause if it was still "running" Edited June 6, 2018 by baylor703
Sketch Posted June 6, 2018 Posted June 6, 2018 (edited) I'm not sure if time compression is related to not stopping all media from playing, but I created a group for you for playing your media files. It immediately stops all media if there is any playing, then lowers the game volume to 50% (adjustable) for 10seconds (adjustable), plays your audio file, then stops all media once the audio file has ended (so don't make a long file that has no sound, or you'll break the group). Maybe when the media file stops playing completely, and the game recognizes it, the time compression will start working again. Steps: 1. Connect the input MCU, 2. Setup your audio file in the "Play Media Track" MCU, 3. Adjust "Lower Game Volume" volume and base timer to match your audio file, 4. Add any subtitle information if you want (or delete the subtitles), 5. And connect your outputs if you have any [for when you want another event to fire off when the media is done playing] Download link: https://drive.google.com/open?id=1maeOUkt6z1a6emptXc4SUKzhn8dH3Nvz And via IL-2 forums: Play Media Group.zip Edited June 6, 2018 by [TWB]Sketch Grammar Nazi
JimTM Posted June 6, 2018 Posted June 6, 2018 (edited) 58 minutes ago, baylor703 said: Ah, I should have been more clear. Each media translator is for a five second or so radio transmission, each unique and in mp3 format. They're triggered by way-points or certain events (and a subtitle along with it). It all works and plays fine at the correct times. No problem there. However, as soon as the first radio transmission plays, you lose your ability to pause or compress time in game for the remainder of the flight. I've tested it, and you are able to do these things just fine so long as there is no audio. As soon as the media translators are introduced, you lose the ability. Because I isolated the source of the problem, I assumed it was because they needed to be canceled or deactivated once played, because the game wouldn't let you pause if it was still "running" I see now. I tested stopping an audio track using a media translator set to "Stop Media". This is what I found: - If you stop the audio after it finishes (OnMediaStopped event message from audio MCU to stop media MCU), pause and time compress do not work. - If you stop the audio before it finishes, pause and time compress do work. Perhaps Sketch's group will work for you. Edited June 6, 2018 by JimTM 1
Sketch Posted June 6, 2018 Posted June 6, 2018 (edited) Interesting... I have the audio file stopping on "onMediaStopped", so most likely it will not work. Give me a few minutes to adjust the group file. Edit: Steps: 1. Set input 2. Set lower game volume settings 3. Set your track you want to play 4. Set timer of how long the track is. This will then stop all media files 5. Set subtitles and output if needed Here is the newer file: Play Media Group v2.zip Edited June 6, 2018 by [TWB]Sketch 1
TheWarsimmer Posted June 6, 2018 Author Posted June 6, 2018 Thanks guys. So this is really interesting. So basically you are sacrificing the pause and time compression functions if you use audio in a mission, unless you perfectly time it to stop right before the mp3 ends? Am I understanding this correctly? Weird...
Sketch Posted June 6, 2018 Posted June 6, 2018 7 minutes ago, baylor703 said: Thanks guys. So this is really interesting. So basically you are sacrificing the pause and time compression functions if you use audio in a mission, unless you perfectly time it to stop right before the mp3 ends? Am I understanding this correctly? Weird... According to Jim, yes. Normally though, I don't use time compression, and therefore would use the normal media audio group that I created. That group stops when the media file is done (but of course, time compression no longer functions).
JimTM Posted June 6, 2018 Posted June 6, 2018 8 minutes ago, baylor703 said: Thanks guys. So this is really interesting. So basically you are sacrificing the pause and time compression functions if you use audio in a mission, unless you perfectly time it to stop right before the mp3 ends? Am I understanding this correctly? Weird... Yes. I suppose you could add a second or two of dead air at the end of the .mp3 and stop the audio during that time.
TheWarsimmer Posted June 6, 2018 Author Posted June 6, 2018 That's what I'm going to have to do. I'm nearly finished, but at an hour long mission, I have to be able to time compress to test functions. Plus, you have to be able to pause. Can't believe you found that out, Jim. I'll add a second of dead air to them and just time them perfectly. Thanks for the template again sketch. Yours is so nice and structured, mine is the equivalent of doctor's writing?
Sketch Posted June 6, 2018 Posted June 6, 2018 26 minutes ago, baylor703 said: Thanks for the template again sketch. Yours is so nice and structured, mine is the equivalent of doctor's writing? You're very welcome. Good luck in your mission.
TheWarsimmer Posted June 7, 2018 Author Posted June 7, 2018 Turns out I still couldn't get it to work, either with Sketch's grouping, or me going in and adding a timer to set a "stop media" translator right before a an mp3 finishes playing. I'll just have to work around this peculiarity and accept you can't pause a mission with audio.
Sketch Posted June 7, 2018 Posted June 7, 2018 The MCU timers are set on "ticks" and not necessarily seconds. Even though it says seconds, the game can sometimes cause these ticks to be slower than seconds. Just for giggles, give a lot of extra dead air to your *.mp3 file just to verify that it's turned off via the MCU timer before the mp3 finishes.
SAS_Storebror Posted June 7, 2018 Posted June 7, 2018 (edited) 20 minutes ago, [TWB]Sketch said: the game can sometimes cause these ticks to be slower than seconds Is that true? I'm wondering because from a DServer operator's point of view, I'm used to have SPS and Tick Delay values. If SPS (Simulations per Second) falls off the normal 50.0 value by just 1.0, I see that the Server would start issuing "overloaded" warning messages to players. Same if the Tick Delay exceeds 20. 50 Simulations per Second would mean that all logic branches are executed once every 20 milliseconds. Assuming that "Tick Delay" is in milliseconds, it would fit perfectly: 20ms Tick Delay would let the game fall off it's tick rate by one full Simulation, which would trigger warnings. Therefore I always assumed that as long as the system is not being overloaded, it's safe to say that ticks fall within 40ms (- 20ms to +20ms, both extremes to be on the safe side), actually most probably even within 21ms. Vice versa, on a system being overloaded, anything can and will happen, so that's out of scope somehow. I would not expect any Tick I'm waiting for to take a second or even more to come. Cheers! Mike Edited June 7, 2018 by SAS_Storebror
Sketch Posted June 7, 2018 Posted June 7, 2018 I could totally be talking out my ass right now, so keep that in mind... BBBBuuuuttt, whenever I have run multiplayer missions that have no overload warnings (sps at 50 and tick delay hovering around 3 or so throughout the mission), my timer MCUs would be slightly delayed. A good example of this is whenever I would setup subtitle MCUs to fire off at the 5 minute mark, then the 10 minute mark, then at the 15 minute, and so on. The first subtitle would be very close to 5 minutes, but by the 20 or 30 minute subtitle mark would be delayed by 10-20 seconds. Again, this is just my observation, it could be totally anecdotal, and why I suggested adding more audio dead space as a test to see what happens. 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now