ios - EZMicrophone with custom AudioStreamBasicDescription -


i want record audio mic, , need audio in specific format. here's code i'm trying run:

audiostreambasicdescription asbd; memset(&asbd, 0, sizeof(asbd)); asbd.mbitsperchannel   = 16; asbd.mbytesperframe    = 2; asbd.mbytesperpacket   = 2; asbd.mchannelsperframe = 1; asbd.mformatflags      = klinearpcmformatflagisbigendian | klinearpcmformatflagissignedinteger | klinearpcmformatflagispacked; asbd.mformatid         = kaudioformatlinearpcm; asbd.mframesperpacket  = 1; asbd.msamplerate       = 8000; self.microphone = [ezmicrophone microphonewithdelegate:self]; [self.microphone setaudiostreambasicdescription:asbd]; 

but app crash.here screen shot.how fix it? enter image description here


Comments

Popular posts from this blog

javascript - Bootstrap Popover: iOS Safari strange behaviour -

Website Login Issue developed in magento -

Can the constants be defined inside a model file of a framework in PHP? -