ios - Using AudioQueueNewInput to record stereo -


i use audioqueuenewinput create stereo recording. configured follows:

    audioformat.mformatid           = kaudioformatlinearpcm;     hardwarechannels = 2;     audioformat.mchannelsperframe   = hardwarechannels;     audioformat.mformatflags        = kaudioformatflagissignedinteger | kaudioformatflagispacked | kaudioformatflagisbigendian;     audioformat.mframesperpacket    = 1;     audioformat.mbitsperchannel     = 16;     audioformat.mbytesperpacket     = (audioformat.mbitsperchannel / 8) * hardwarechannels;     audioformat.mbytesperframe      = audioformat.mbytesperpacket;     osstatus result =    audioqueuenewinput(                             &audioformat,                             recordingcallback,                             (__bridge void *)(self),                    // userdata                             null,                   // run loop                             null,                   // run loop mode                             0,                      // flags                             &queueobject                         );     audioqueuestart (         queueobject,         null            // start time. null means possible.     ); 

i tested code on iphone 6s plus external stereo microphone. not seem record stereo. both left , right channels identical streams of data. else need record stereo?


Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -