Conversation
- deprecate TapeInfo.size and pos, replace with duration and position in milliseconds - add playbackRate (for potential future enhancement of accelerated tape loading) - add playbackRateChangeCallback to avoid client polling - remove myIsPlaying since it is redundant with myBaseCycles != -1 - update sdlsettings for new API
|
Do we really need the deprecation? Who is using it? |
|
|
|
Re deprecation: I just wasn’t sure if any of your other frontends are using it. If it’s just sa2 then they can be deleted. Re |
|
OK, just remove the deprecated things. |
|
@audetto removed the deprecated fields |
|
I am not sure I understand github's way to comment on lines. So i repeat theme here #pragma GCC diagnostic push why we need this? and void (*playbackRateChangeCallback)(double playbackRate) = 0; can we be a bit more modern with a std::function<void(double)> ? |
|
- remove directive to ignore irrelevant deprecation warning - change playbackRateChangeCallback to std::function
- force getTapeInfo()'s playbackRate to be 0 if myReachEnd, because playbackRateChangeCallback() gets called when progress reaches 99% and (pos < size - 1) would still report a 1.0 rate. - set myReachedEnd first so that calling getTapeInfo() from a playbackRateChangeCallback() implementation will get the correct rate of 0.
|
@audetto updated as requested. |
|
Since we are making it more readable, I'd change |
|
@audetto done! |
TapeInfo.sizeandpos, replace withdurationandpositionin millisecondsplaybackRate(for potential future enhancement of accelerated tape loading)playbackRateChangeCallbackto avoid client pollingmyIsPlayingsince it is redundant withmyBaseCycles!= -1notes:
sizeandposto avoid breaking any non-sa2 clientsFrameBasesee #338