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
Post a Comment