-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.6.0: AudioChannel.Position not working correctly for all sound types #1695
Comments
Is the midi and mod not working a non-implemented part in SDL_Sound too, like it was in the more case? |
No, it's not something non-implemented, but simply a restriction of the interface design. SDL_Sound's interface is fully opaque so there's no way to know the actual sound format, or do any format specific operations. We may seek and get position in milliseconds for all these sound types, but not in the special position kind required by AGS. With the WAV it is possible to get sample count since we know duration in ms and frequency, but I don't yet know if anything similar is possible to do with MIDI and MOD. |
I imagine with MIDI it should be possible, but the pattern number for mod is an odd one, I need to look into the code to see what that really means. |
If this cannot be done with the available data, then it may be worth asking SDL_Sound author(s) if they see this acceptable to add format-specific functions into the library API. Or as some kind of extension. |
ok, read a bit on the old code, there were jgmod and aldumb builds of ags apparently, am considering only aldumb. Aldumb clips returns current order for position. From reading the loaded data, I think the mod clip is made of orders which index a specific pattern, which is it made of different ordered samples in different channels. Looking into SDL_sound, the modplug used there doesn't have an interface internally too. It has an interesting comment on seeking using milliseconds, which is why I think ags/aldumb used the order instead. |
According to the manual AudioChannel.Position:
This was never fully reimplemented in 3.6.0 after audio subsystem rewrite.
Latest state:
Same refers to the AudioChannel.Seek function.
The text was updated successfully, but these errors were encountered: