Struct audiostreambasicdescription {float64 msamplerate; // 44100; sampling rate (Stereo = 8000) uint32 mformatid; // kaudioformatlinearpcm; audio format uint32 mformatflags; // klinearpcmformatflagissiGnedinteger | klinearpcmformatflagispaCked; uint32 mbytesperpacket; // number of bytes in a packet. If the variable packet is set to 0; (format. mbytesperframe * format. mframesperpacket) uint32 mframesperpacket; // Number of frames contained in packet. The value is 1 if there is no compression. When the bit rate is variable, a fixed value up to a certain point, for example, 1024 in ACC. Uint32 mbytesperframe; // (format. mbitsperchannel/* Format. mchannelsperframe); uint32 mchannelsperframe; // number of channels contained in the frame // 1: single channel; 2: Stereo uint32 mbitsperchannel; // 16; // Number of uint32 mreserved digits occupied by voice at each sampling point; // reserved };
Audiostreambasicdescription format; // audio format settings. these settings are the same as those in the collection.
memset(&format, 0, sizeof(format));