Skip to content
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

Implement Get MIDI Ticks for non-MIDI formats by returning position in sec #1523

Merged
merged 1 commit into from Dec 4, 2018

Conversation

Projects
None yet
3 participants
@Ghabry
Copy link
Member

Ghabry commented Dec 4, 2018

Implemented for mpg123, libvorbisfile and libopusfile.
Works for EmptyAudio and SDLAudio by approximating it through the frame count.

When no BGM is playing the returned value is 0.

Fix #1517

Implement Get MIDI Ticks for non-MIDI formats by returning the playba…
…ck position in seconds.

Implemented for mpg123, libvorbisfile and libopusfile.
Works for EmptyAudio and SDLAudio by approximating it through the frame count.

When no BGM is playing the returned value is 0.

Fix #1517
@Ghabry

This comment has been minimized.

Copy link
Member Author

Ghabry commented Dec 4, 2018

Couldn't figure out how to do this with libsndfile, don't see this exposed through the API :/

@Ghabry Ghabry added this to the 0.6.0 (likely) milestone Dec 4, 2018

@carstene1ns carstene1ns merged commit 2fd9b09 into EasyRPG:master Dec 4, 2018

7 checks passed

Android (armeabi-v7a) Build finished.
Details
GNU/Linux Build finished.
Details
OSX Build finished.
Details
Wii (SDL1) Build finished.
Details
Windows (x64) Build finished.
Details
Windows (x86) Build finished.
Details
web Build finished.
Details
@fdelapena

This comment has been minimized.

Copy link
Contributor

fdelapena commented Dec 5, 2018

Couldn't figure out how to do this with libsndfile, don't see this exposed through the API :/

Perhaps the sf_vio_tell implementation which uses ftell may help somehow, at least knowing the WAV type for PCM and sample rate it could be guessed with acceptable precision. For MS ADPCM it is also possible because the bitrate is constant (somebody says around 352 kbps). However, MS ADPCM for music is not widely used because when MS ADPCM landed in RPG_RT (1.50/1.05) it also added support for MP3.

@Ghabry Ghabry deleted the Ghabry:music-ticks branch Jan 3, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.