ios - Possible causes of callback function when using audio queue not getting called. edit: NVM figured it out -


really i'm @ lost here.

i have setting correctly knowledge - if messed of values there callback should still invoked.

my calling code if cares - called button action:

[self audiodataformatsetup:&anaqdata];  nslog(@"buffer size %lu, packets %lu", anaqdata.bufferbytesize, anaqdata.mnumpacketstoread);  anaqdata.misrunning = true;    audioqueuenewoutput (                                                      &anaqdata.mdataformat,                                 handleoutputbuffer,                                   &anaqdata,                                              cfrunloopgetcurrent(),                       kcfrunloopcommonmodes,                                0,                                                    &anaqdata.mqueue                                       );  //buffers here anaqdata.mcurrentpacket = 0;                                (int = 0; < knumberbuffers; ++i) {                    audioqueueallocatebuffer (                                                          anaqdata.mqueue,                                           anaqdata.bufferbytesize,                                   &anaqdata.mbuffers[i]                                      );      handleoutputbuffer (                                                          &anaqdata,                                                  anaqdata.mqueue,                                           anaqdata.mbuffers[i]                                       ); }  nslog(@"buffer size %lu, packets %lu", anaqdata.bufferbytesize, anaqdata.mnumpacketstoread);   audioqueuestart (                                                    anaqdata.mqueue,                                    null                                                );  nslog(@"aq started"); /* {                                                    cfrunloopruninmode (                                                    kcfrunloopdefaultmode,                              0.25,                                               false                                               ); } while (anaqdata.misrunning);  cfrunloopruninmode (                                                    kcfrunloopdefaultmode,                     1,                     false                     );*/ 

no error nothing. ridiculous.

edit: never mind i'm moron can't read.

i forgot set "maudiodatabytesize" indicate buffer has data worth reading. /facepalm

ps: forgot increment startingpacket/currentpacket too. /sigh

pps: fault in callback btw. missed out few steps there.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -