Lines Matching defs:NBAIO_Format

49 // mutually agreed upon.  Each offer is an NBAIO_Format.  For simplicity and performance,
50 // NBAIO_Format is a typedef that ties together the most important combinations of the various
52 // interleave, packing, alignment, etc. The reason is that NBAIO_Format tries to abstract out only
56 struct NBAIO_Format {
65 extern const NBAIO_Format Format_Invalid;
67 // Return the frame size of an NBAIO_Format in bytes
68 size_t Format_frameSize(const NBAIO_Format& format);
70 // Convert a sample rate in Hz and channel count to an NBAIO_Format
72 NBAIO_Format Format_from_SR_C(unsigned sampleRate, unsigned channelCount, audio_format_t format);
74 // Return the sample rate in Hz of an NBAIO_Format
75 unsigned Format_sampleRate(const NBAIO_Format& format);
77 // Return the channel count of an NBAIO_Format
78 unsigned Format_channelCount(const NBAIO_Format& format);
85 // Check whether an NBAIO_Format is valid
86 bool Format_isValid(const NBAIO_Format& format);
88 // Compare two NBAIO_Format values
89 bool Format_isEqual(const NBAIO_Format& format1, const NBAIO_Format& format2);
121 virtual ssize_t negotiate(const NBAIO_Format offers[], size_t numOffers,
122 NBAIO_Format counterOffers[], size_t& numCounterOffers);
126 virtual NBAIO_Format format() const { return mNegotiated ? mFormat : Format_Invalid; }
129 NBAIO_Port(const NBAIO_Format& format) : mNegotiated(false), mFormat(format),
136 NBAIO_Format mFormat; // (mFormat != Format_Invalid) does not imply mNegotiated
234 NBAIO_Sink(const NBAIO_Format& format = Format_Invalid) : NBAIO_Port(format), mFramesWritten(0) { }
325 NBAIO_Source(const NBAIO_Format& format = Format_Invalid) : NBAIO_Port(format), mFramesRead(0) { }