Skip to content

Conversation

@mitchmindtree
Copy link
Member

I began on an implementation of the timestamp API described in #363 but
quickly realised that it might be best to land the API for providing
extra information to the user's callback first.

This PR adds two new types: InputCallbackInfo and OutputCallbackInfo.
These types are delivered to the user's data callback as a new, second
argument.

While these types are currently empty, the intention is for these types
to provide information relevant to the current request for or delivery
of data. This includes:

In order to maintain flexibility to avoid breaking things, I figure we
can keep the fields of these types private and provide methods for
retrieving this info.

@Ralith, @ishitatsuyuki, anyone else, does this seem OK to you?

I began on an implementation of the timestamp API described in RustAudio#363 but
quickly realised that it might be best to land the API for providing
extra information to the user's callback first.

This PR adds two new types: `InputCallbackInfo` and `OutputCallbackInfo`.
These types are delivered to the user's data callback as a new, second
argument.

While these types are currently empty, the intention is for these types
to provide information relevant to the current request for or delivery
of data. This includes:

- Timestamp information RustAudio#363.
- Flags related to the state of the stream (e.g buffer
  underflow/overflow).

In order to maintain flexibility to avoid breaking things, I figure we
can keep the fields of these types private and provide methods for
retrieving this info.

@Ralith, @ishitatsuyuki does this seem OK to you?
@mitchmindtree mitchmindtree merged commit f032557 into RustAudio:master Apr 27, 2020
mitchmindtree added a commit to mitchmindtree/cpal that referenced this pull request May 21, 2020
This rebases RustAudio#372, addressing the recent changes introduced by RustAudio#397, RustAudio#395, and RustAudio#371 in the process.

TODO:

- [ ] Complete implementation of `callback` and `playback` timestamps in the output stream callback.
mitchmindtree added a commit to mitchmindtree/cpal that referenced this pull request May 21, 2020
This rebases RustAudio#372, addressing the recent changes introduced by RustAudio#397, RustAudio#395, and RustAudio#371 in the process.

TODO:

- [ ] Complete implementation of `callback` and `playback` timestamps in the output stream callback.
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.

2 participants