GithubHelp home page GithubHelp logo

cocoa-waveform's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cocoa-waveform's Issues

Using NSData possible?

Hello,

I have NSData representation of some audio files.. Can I still use this extension?

Thanks..
Matt

Cool - how portable to cocoatouch / iOS?

I just tested out cocoa-waveform -- very cool.

I'm working on a special needs app for kids with autism for iPad and iPhone. I'd love to drop-in your viewer/player but I see there is a fair amount of Mac-specific coding in the current implementation.

I thought I'd ask to see if you were planning on bringing this over to iOS -- any plans?

Mike

Leaks

The Xcode Instruments show leaks in string:

error = AudioFileGetProperty(afid, kAudioFilePropertyInfoDictionary, &size, &info);

Question about readConsecutive:(SInt64)numFrames intoArray:(float**)audio

Hi, me again...

I'm trying to understand why you're 'chunking' the reading of the samples from the audio file instead of just doing it all at once(?) Is it to account for a situation where the sound file might be extremely long, and thus exceed the available memory on the device?

Thanks again!

Question for Help!

Hello again,

Thank you very much for your answer. It was very helpful for me and now I can use your lovely tool in my app.
One little question.
If I want to stop playing the sound programmatically without to press pause button how can I do it?

Also I get a warning which is :

ARC Retain Cycle
"Capturing 'self' strongly in this block is likely to lead to a retain cycle"

Can you take care about that?

Thank you in advance

George N. Gerardis

Low waveform resolution for short audio files

Hi, this sample is really useful, so thank you for submitting it!

I've noticed that when using short audio files (e.g. 5 seconds) the waveform resolution is not so good, it results in large "chunks" in the waveform rather than detailed peaks.

I've tried to play with the parameters in the drawRect method as you suggested, including CGContextSetLineWidth and CGContextSetLineCap, but I can't get it to change. Can you help?

Many thanks!

Enhancement for the tool

Hello,

First of all I would like to thank you for this nice and interesting tool.
One recommentation.....
Can you enhancement your tool to work with caf AAC sound files in ios Except only MP3 ones?

Thank you in advance

George N. Gerardis

When pressing play at the end of a sound clip, the sound file doesn't reset. - iOS

Not a huge deal, but I figured I'd bring it up.

When you are done listening to a sound clip, the audio stops and the button returns to 'play'. When you click on play though, it starts playing after the sound file.

For example, the app says 2:55/2:55 when the sound file is done playing. If play is pressed again, time will increase at that interval - 2:55/2:56, 2:55/2:57, so on so forth.

 - Could be fixed on line 145 by replacing with this:
  if(player.rate == 0.0 && (CMTimeGetSeconds(player.currentTime)/CMTimeGetSeconds(player.currentItem.duration)) < 1.0) 

EDIT: Also found: Before you load a sound, there is nothing where the play/pause is. That would be fine, however you can still click on it and the green text says 'playing'.

  • Can be fixed by deleting lines 141-143.

These behaviors occurs in the iOS version, not the OSX version.

Thanks

License unclear

Looks like a great project but I'm scared to download it because the license is not clear. There are copyright notices in the code with All Rights Reserved so this code clearly can't be used in a project without the author having the ability to claim illegal use of the code. Please add a LICENSE.

Question about dataForResolution:lenght:

Hello!
Thank you very much for sharing this code. I'm still fairly new to programming and am struggling to understand what's happening inside the dataForResolution:lenght method. I think all the nested loops are confusing me.

I've compared the samples stored in the WaveSampleProvider's normalizedData array with the samples returned by dataForResolution:lenght: in sd and they're identical (I'm using a very short, 2 second, piece of audio).

What is the pixelWide argument?
What is the rangeLength variable? and why do you add 1 to pixelWide in the denominator?

Update:
Spending more time with this I think I get it...

In the case where we have more samples in our array than we have points/pixels to draw on the screen, to draw them we need to scale the number of samples down to fit the resolution of the area being drawn to. dataForResolution:: is performing that scaling.

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.