Comments (9)
I want to record to have timer along with sound wave to sync it
from dswaveformimage.
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.
how can i call currentTime on view and use it
from dswaveformimage.
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.
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.
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.
Thank you @dmrschmidt
from dswaveformimage.
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.
from dswaveformimage.
Related Issues (20)
- Wavefrom form Data in SwiftUI HOT 7
- WaveformLiveView for Local Path HOT 13
- There's many different ways this could be achieved. HOT 3
- Fatal error HOT 3
- Current amplitude HOT 1
- Empty audio not displayed even with Should Draw Silence HOT 6
- Compile error in Xcode 15 beta. HOT 2
- Missing Pause Functionality HOT 1
- -11800 Error code when generation samples on iOS 17 beta HOT 10
- mp3 File not support HOT 8
- xcode 15 not support. Stored properties cannot be marked unavailable with '@available' HOT 1
- Striped style with gradient HOT 2
- Stored properties cannot be marked unavailable with '@available' HOT 3
- Stored properties cannot be marked unavailable with '@available' HOT 1
- Thread 1: EXC_BAD_ACCESS (code=2, address=0x2829857c4) HOT 1
- WaveForm Flickering HOT 2
- Extra argument position in call error in MacOS HOT 1
- I need to show loader till complete image generating from audio URL. HOT 2
- Update version in cocoapod HOT 2
- crash in iOS 17 HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dswaveformimage.