MaKiPL / OpenVIII-monogame

Open source Final Fantasy VIII engine implementation in C# working on Windows and Linux (Android and iOS planned too!) [Monogame]
MIT License
645 stars 59 forks source link

Xna SoundEffectInstance.pause won't work #19

Open Sebanisu opened 5 years ago

Sebanisu commented 5 years ago

I was going to add pausing to movie player this morning. But I could not get the audio to pause. Maybe it's how I set stuff up. I could pause the video. But the audio would start gliching instead of stopping. I maybe able to make a function to calculate where in the byte[] the audio position is and restart playback from that.

Sebanisu commented 5 years ago

since I'm now using a dynamicsoundeffectinstance. I can halt sending data to it. Which in effect pauses the sound. Probably would have to also set volume to 0 as it will make garbage when I do it. When I start sending data to it again that second or so will not get played. And the video will be out of sync so I'll need to solve that issue. https://github.com/MaKiPL/OpenVIII/issues/32 Though if I know exactly how much data was lost I could seek ffmpeg back to that point so when playback starts I wouldn't need to do anything to the video.