Thanks a lot!
This solves my issues.
This solves my issues.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuote from: Snarky on Tue 21/03/2023 11:56:26Even so. There are a lot of benefits to splitting it up and keeping a one-to-one relationship between a line of text dialog and an audio clip. For example, if you were to translate it, you could do so without having to change all the subtitle timings. And you wouldn't have to write a whole bunch of special-purpose code to time the subtitles to the audio. (Though admittedly you would need to write code, or use a pre-written module, to provide queued background speech with voice.) And you would be easily able to vary it more dynamically; so that for example if the player leaves the room and comes back, it resumes at the next line (if you want); or if you try to talk to the person speaking in the background, you can interrupt them, and then they'll be able to resume afterwards with some kind of transition, like "What was I saying? Oh yes..."
Quote from: Crimson Wizard on Tue 21/03/2023 10:08:51PositionMs is calculated based on sound data, not timer. The decoder converts every supported input format to a uniform sound wave format, after which the current position may be calculated, roughly speaking, as (DATA_SIZE_PLAYED / DATA_SIZE_PER_SECOND).
Certain lags cannot be avoided completely, as there's a difference in time between audio playing and game updates, but this difference should not accumulate and stay in some range.
Quote from: Crimson Wizard on Tue 21/03/2023 10:08:51That said, as eri0o mentioned above, in adventure games the conversations are usually done split into pieces for the convenience of a player. Not every player can understand voice well (if it's not their native language), or read the text as fast as you expected. For that reason it may be more convenient to have a pause in between "sections", where text still stays on screen. This behavior may also be configured: whether a conversation continues automatically or awaits for player's input, how long it waits, and so forth. I thought I'd mention this too just in case.
Quote from: eri0o on Tue 21/03/2023 08:59:20The sound file doesn't have time data in the way you are mentioning.
Sound plays in it's own thread so it doesn't desync and the timing in MS is correct in my tests.
Quote from: Khris on Tue 21/03/2023 08:59:45Couldn't you simply try it with a, say, two minute audio file? Schedule something for a specific position near the end and see what happens? That should be quicker than us guessing around, and I'd also guess that if the function isn't perfectly reliable, it's not something that can be fixed in the engine code easily because otherwise it would've been implemented like that already.
Looking for solutions or alternatives only makes sense once it's established that the function isn't reliable.
Quote from: eri0o on Mon 20/03/2023 23:49:11If I remember correctly ogg files have a fixed bitrate and mp3 files can have a variable bit rate, when the mp3 has a variable bitrate it's length I think can result in a gap
QuoteOGG encoding is technically a form of VBR or variable bit rate encoding, as opposed to the CBR or constant bit rate encoding used by default when exporting MP3 files.
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.062 seconds with 16 queries.