opengl es - iOS record audio and draw waveform like Voice Memos -
i'm going ask @ risk of being vague or asking many things in 1 question, i'm looking point in right direction.
in app want record audio, show waveform while recording, , scroll through waveform record , playback specified time. example, if have 3 minutes of audio, should able scroll 2:00 , start recording there fix mistake.
in voice memos, accomplished instantaneously, without delay or loading time. i'm trying figure out how did this, if has clue.
what i've tried:
ezaudio - library great, doesn't want. can't scroll through waveform. deletes waveform data @ beginning , begins appending end once reaches length.
scwaveformview - waveform nice, uses images. once waveform long, putting in scroll view causes jittery scrolling. can't build waveform while recording, afterward.
as far appending, i've used method: https://stackoverflow.com/a/11520553/1391672 there significant processing time, when appending 2 short clips of audio (in experience).
how voice memos does? think waveform drawn in opengl or coregraphics? using core audio or avaudiorecorder? has built can point me in right direction?
when zoomed-in, scrollview needs draw small portion of waveform visible. when zoomed-out, graph view might drawn every nth point of audio buffer, or use other dsp down-sampling algorithm on data before rendering. has done using own custom drawing or graphics rendering code inside uiscrollview or similar custom controller. waveform rendering code during , after recording don't have same.
the recording api , drawing api use can independent, , can anything, opengl metal core graphics (on newer faster devices). on audio end, core audio provide lowest latency, audio queues , avaudioengine might suitable.
Comments
Post a Comment