19 #include <ucommon/ucommon.h>
20 #include <ucommon/export.h>
24 using namespace UCOMMON_NAMESPACE;
31 void Audio::Info::clear(
void)
33 memset(
this, 0,
sizeof(Info));
36 void Audio::Info::setRate(rate_t r)
38 rate = getRate(encoding, r);
42 void Audio::Info::setFraming(timeout_t timeout)
46 framing = getFraming(encoding);
52 timeout = (timeout / framing);
56 timeout = timeout * framing;
71 framecount = (rate * framing) / 1000l;
72 framesize = (unsigned)toBytes(encoding, framecount);
75 void Audio::Info::set(
void)
80 framesize = (12 * bitrate / rate) * 4 + headersize + padding;
85 framesize = (144 * bitrate / rate) + headersize + padding;
91 framesize = getFrame(encoding);
94 framecount = getCount(encoding);
97 rate = getRate(encoding);
99 if(!bitrate && rate && framesize && framecount)
100 bitrate = ((long)framesize * 8l * rate) / (long)framecount;
#define BAYONNE_NAMESPACE
GNU Bayonne library namespace.