Giter Site home page Giter Site logo

setStreamTime? about rtaudio HOT 7 CLOSED

thestk avatar thestk commented on June 13, 2024
setStreamTime?

from rtaudio.

Comments (7)

sonoro1234 avatar sonoro1234 commented on June 13, 2024

imagine I want to sync some video frames to audio stream:
with startStream streamtime starts increasing with each audiobuffer
with stopStream streamtime stops increasing so video frames stop increasing
then startStream again and streamtime goes on increasing and video frames procced

But if I want to rewind in order to play from sec. 5 in the movie (with video frames synced to streamtime) I should be able to do setStreamTime(5)

from rtaudio.

garyscavone avatar garyscavone commented on June 13, 2024

Hi Victor,

RtAudio is designed to work only with realtime audio streams. So, it is not possible to backup in a stream (no data is saved). Or am I misunderstanding you?

β€”gary

On Apr 23, 2014, at 3:57 PM, Victor Bombi [email protected] wrote:

imagine I want to sync some video frames to audio stream:
with startStream streamtime starts increasing with each audiobuffer
with stopStream streamtime stops increasing so video frames stop increasing
then startStream again and streamtime goes on increasing and video frames procced

But if I want to rewind in order to play from sec. 5 in the movie (with video frames synced to streamtime) I should be able to do setStreamTime(5)

β€”
Reply to this email directly or view it on GitHub.

from rtaudio.

sonoro1234 avatar sonoro1234 commented on June 13, 2024

The purpose is only to change the clock that streamtime provides in order to sync things to it (for example some video frames)
I understand that if I am playing an audio file I would have to rewind that file by myself

from rtaudio.

garyscavone avatar garyscavone commented on June 13, 2024

I just added a new setStreamTime() function in the new release ... it was easy to do. For the moment, I only accept times >= 0.0, unless someone can convince me it should allow negative times too.

from rtaudio.

sonoro1234 avatar sonoro1234 commented on June 13, 2024

Thanks alot!!!
Setting negative streamtime could be useful to implement pre-count: When something is queued on time 0 secs but you must do something prior to that (As in sequencers for example).
But if it were too complicated, user could always queue the first event on a positive time value.

victor

from rtaudio.

garyscavone avatar garyscavone commented on June 13, 2024

Hi Victor,

It would be extremely simple to change it to allow negative values. If you think it is useful, I will do that.

Regards,

β€”gary

On Apr 26, 2014, at 4:01 PM, Victor Bombi [email protected] wrote:

Thanks alot!!!
Setting negative streamtime could be useful to implement pre-count: When something is queued on time 0 secs but you must do something prior to that (As in sequencers for example).
But if it were too complicated, user could always queue the first event on a positive time value.

victor

β€”
Reply to this email directly or view it on GitHub.

from rtaudio.

sonoro1234 avatar sonoro1234 commented on June 13, 2024

Yes, it would be useful for implementing pre-count in a sequencer.

By the way I have the work done in https://github.com/sonoro1234/luaRtAudio
with this github RtAudio as a submodule.

Regards
victor

from rtaudio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.