EZAudio output source is not consistant ? and EZAudio Plot Mirror Not Consistant?

陌路散爱 提交于 2019-12-12 02:16:53

问题


Its taking random output source, some time uses the phone hearing speaker some times loud speaker.

I implemented the EZAudioPlotGL,sometimes only the top part of it is showing , even though shouldMirror is set to YES at all times. Any Suggestions ?


回答1:


I have used "EZAudioPlot.h" class rather than "EZAudioPlotGL.h". which resolves issue of inconsistent wave form.

and implemented clear method in "EZAudioPlot.m" class because it does not have implementation or clear method.

  -(void)clear
{
    float              empty[_changingHistorySize];
    // Figure out better way to do this
    for(int i = 0; i < _changingHistorySize; i++ )
    {
        empty[i] = 0.0f;
    }
    for(int i = 0; i < _scrollHistoryLength; i++)
    {
        _scrollHistory[i] = 0.0f;
    }
    _scrollHistoryIndex = 0;

    [self setSampleData:_scrollHistory
                 length:(!_setMaxLength?kEZAudioPlotMaxHistoryBufferLength:_scrollHistoryLength)];
}


来源:https://stackoverflow.com/questions/29910476/ezaudio-output-source-is-not-consistant-and-ezaudio-plot-mirror-not-consistant

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!