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

added function and improved argument order consistency #50

Closed
wants to merge 3 commits into from

Conversation

superbigio
Copy link

@superbigio superbigio commented Nov 11, 2019

I send you a PR for the following:

  1. I added
    size_t ltc_encoder_get_bufferoffset(LTCEncoder *e)
    to query the write offset of the internal buffer.
    I found this very useful in a variety of situations, especially when the size of the internal buffer is larger than exactly 1 frame of LTC. In my specific user case I need to change FPS in real-time so I have to allocate a buffer large enough to hold the lowest FPS allowed. However I can see how this could come handy also in situations where you want to speed-up or slow-down the timecode.
    It is true that you get the offset when you get the buffer anyway, but sometimes I found myself in need of the offset only.

  2. I changed and renamed
    ltcsnd_sample_t *ltc_encoder_get_bufptr(LTCEncoder *e, int *size, int flush)
    to
    int ltc_encoder_get_bufferptr(LTCEncoder *e, ltcsnd_sample_t *buf, int flush)
    The argument order of the latter function is now consistent with get_buffer, copy_buffer, etc...
    Obviously I deprecated the former and exported it exactly like I did previously for other functions. So nothing should break.

  3. Comments updated to refer to the new function names

@superbigio superbigio closed this Nov 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants