Giter Club home page Giter Club logo

Comments (9)

ducduy20 avatar ducduy20 commented on May 22, 2024

I want to record to have timer along with sound wave to sync it

from dswaveformimage.

dmrschmidt avatar dmrschmidt commented on May 22, 2024

You can have a look at https://github.com/dmrschmidt/DSWaveformImage/blob/main/Example/DSWaveformImageExample-iOS/SCAudioManager.m which uses a timer and the recorder‘s currentTime property.

you’ll want to do sth similar.

from dswaveformimage.

ducduy20 avatar ducduy20 commented on May 22, 2024

Screenshot 2023-01-04 at 16 03 46
how can i call currentTime on view and use it

from dswaveformimage.

dmrschmidt avatar dmrschmidt commented on May 22, 2024

Hey @ducduy20,

this is getting a bit too far out of scope for the support I can provide here as it’s not related to the library anymore. For general questions on software development topics, please consider stackoverflow etc.

Your question is quite imprecise, so it’s hard to guess what you are looking for. If you’re looking to get a good answer, try being more descriptive what you would like to achieve. Plus what you have tried so far and why that doesn’t work. Ie by providing error messages or a detailed description of the problem.

I can see that you are already using currentTime in the code, so I’m not quite sure what you are looking for. Do you mean you don’t know how to make currentTime available inside of a view to display it?

If that’s the case, you’ll probably want to look at creating an ObservableObject which owns the recorder, and exposes an @published var currentTime or the like. Could already be the formatted string.

from dswaveformimage.

ducduy20 avatar ducduy20 commented on May 22, 2024

Hey @dmrschmidt
Thanks for reply because here i use your wave for recording and i want to use timer timer.
So because of the eigen counter and the eigenwave, does it affect the drawing ability of the wave.
I apologize for asking things that are not related to the library

from dswaveformimage.

dmrschmidt avatar dmrschmidt commented on May 22, 2024

What is an eigen counter and an eigenwave? I don't suppose you mean this as it really doesn't matter what kind of wave you're drawing, as long as it can be represented as a 1-dimensional list of values of magnitudes.

The drawing of the wave has some performance implications of course, if that's what you mean. That timer, which you set to 0.01 (I believe that's seconds) is a recommendation to the OS. It may not be able to fulfill this request if too much is clogging the CPU. However, as you typically don't want to update a timer more often than once per second, there should be absolutely no noticeable downgrading effect whatsoever of drawing the wave and the numerical timer somewhere in the view as 1:42m or similar.

Also you won't be recalculating the wave constantly and instead only once if you're doing it like in that progress indicator question you also wrote a comment in.

from dswaveformimage.

ducduy20 avatar ducduy20 commented on May 22, 2024

Thank you @dmrschmidt

from dswaveformimage.

ducduy20 avatar ducduy20 commented on May 22, 2024

hey @dmrschmidt
There is one more problem, i don't know if it is related to the library? . But is there a way to change the song duration to 0 to 1 so that I can use the wave to play back the audio

from dswaveformimage.

dmrschmidt avatar dmrschmidt commented on May 22, 2024

from dswaveformimage.

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.