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

Having a scrollview instead of erasing and redrawing the content #11

Closed
jbouaziz opened this issue Jan 10, 2014 · 7 comments
Closed

Having a scrollview instead of erasing and redrawing the content #11

jbouaziz opened this issue Jan 10, 2014 · 7 comments

Comments

@jbouaziz
Copy link

Hey!

Great job on the library! Really.
Would there be a way to have a scrollview instead of erasing what's been drawn already? You can try recording using the SoundCloud app to see what I'm talking about.

@syedhali
Copy link
Owner

Helloo, glad you're digging EZAudio! I think a scrolling waveform would be an awesome addition. Perhaps adding an additional EZPlotType like:

/**
 The types of plots that can be displayed in the view using the data.
 */
typedef NS_ENUM(NSInteger,EZPlotType){
  /**
   *  Plot that displays only the samples of the current buffer
   */
  EZPlotTypeBuffer,
  /**
   *  Plot that displays a rolling history of values using the RMS calculated for each incoming buffer
   */
  EZPlotTypeRolling,
  /**
   *  Plot that displays a scrolling, rolling history of values using the RMS calculated for each incoming buffer
   */
  EZPlotTypeScrolling,
};

and extending the plots to accompany the custom history buffer handling to support the scrolling (once full, add N data to front and remove N data from beginning of display buffer).

I'm currently busy working on an EZAudio version 0.0.3 with a couple bug fixes, updates, and extensions for the EZMicrophone, EZAudioFile, and EZOutput based on the emails I've been getting in the last few weeks. I'll put this on the radar for the next version 0.0.4 as an extension for the EZAudioPlot and EZAudioPlotGL.

Contributing

If anyone is interested in becoming an EZAudio contributor and would like to take a crack at implementing this scrolling waveform for either the EZAudioPlot or the EZAudioPlotGL I'd happily accept a pull request!

@jbouaziz
Copy link
Author

I'll look into that, thanks!

@syedhali
Copy link
Owner

I hacked on this a little last night and got the scrolling waveform with an adjustable history buffer. This is more of the behavior I had in mind when I was first designing the EZPlotTypeRolling so I'm going to refactor the EZAudioPlot and EZAudioPlotGL now so you can expect it in the update for 0.0.3.

@syedhali
Copy link
Owner

Alright, I've added scrolling behavior to the EZAudioPlot and EZAudioPlotGL for iOS and OSX. All rolling plots included in the examples will now scroll instead of wipe the whole screen. You can test the master branch if you'd like - here's a gif of it in action (check the examples to see the actual speed):
ezaudio-scrolling-history

@mayank4ios
Copy link

I couldn't find the scrolling behavior in EZAudio.. Can you please help me?

@mnearents
Copy link

It doesn't scroll, it just removes points from the beginning and adds them to the end so it appears to be scrolling while recordin . But when you're done recording you can't scroll back through it.

@mayank4ios
Copy link

Ok... Thanks.. :)

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

No branches or pull requests

4 participants