Giter Club home page Giter Club logo

akhilcb / acbavplayerextension Goto Github PK

View Code? Open in Web Editor NEW
78.0 3.0 15.0 2.29 MB

An extension on AVPlayer which converts it to have all useful features of AVAudioPlayer but with streaming support. Also added additional methods to support Audio visualization from AVPlayer streaming.

License: MIT License

Objective-C 95.77% Swift 2.08% Ruby 2.16%
avplayer avaudioplayer objective-c swift extension metering audio-visualizer audio-processing audio-streaming audio-player

acbavplayerextension's People

Contributors

akhilcb avatar

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

Watchers

 avatar  avatar  avatar

acbavplayerextension's Issues

Swift

Perfect just what I need. But Sorry I am not familiar with C.
Is it possible to get an example on how to get a power meter value on an AVPlayer in swift ??

Changing item the PCM buffer is not called anymore

I can see the callback called goo on first item, when I change the item with method: replaceCurrentItemWithPlayerItem

    AVPlayerItem *item = [self audioItem];
    [self.player replaceCurrentItemWithPlayerItem:item];

the callback audioPCMBufferFetchedWithCallbackBlock is not called anymore.

I've also tried:

    [self.player play];
    [self.player setMeteringEnabled:YES];

    [self.player audioPCMBufferFetchedWithCallbackBlock:^(AVAudioPCMBuffer *audioPCMBuffer, BOOL iSuccess) {
        
    }];

forcing metering enabled to YES again...but nothing changes.

Are there come known issues with audio/video items?
How can I fix?

Is it possible to get the current amplitude as the media is being played?

Great stuff!

The project seems exactly what I need but to make sure:

Is it possible to get the current amplitude as the media is being played?

I am thinking of doing a simple visualization and I'd like to get every 0.5s or so the current updated volume/amplitude of the audio being played. If so, how would I get that value (I'm thinking something between 0 and 1)?

Thanks in advance!

Memory Leak Issue (MYAudioTapProcessor.m)

I ran some profiling with Instruments and found that this snippet in MYAudioTapProcessor.m, in particular the malloc, is causing severe memory leaks. I didn't need the channelVolumeList functionality for my use case so I commented it out but wanted to flag this for others.

if (aCount > 0) {
        context->channelVolumeList = malloc(aCount * sizeof(float));
        if (context->channelVolumeList == 0) {
            NSLog(@"Error! could not initialize channel volume list");
        }
}

HLS Stream

Hi,
it seems that with HLS stream (m3u8), the volume meter doesn't work...
Could you check please?

thank you

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.