Qt 4.8
Public Functions | Properties | List of all members
QtMultimediaInternal::QAudioPacketFeeder Class Reference

Public Functions

bool empty () const
 
bool feed (AudioBufferList &dst, UInt32 &packetCount)
 
 QAudioPacketFeeder (QAudioBufferList *abl)
 

Properties

QAudioBufferListaudioBufferList
 
UInt32 position
 
UInt32 totalPackets
 

Detailed Description

Definition at line 184 of file qaudioinput_mac_p.cpp.

Constructors and Destructors

◆ QAudioPacketFeeder()

QtMultimediaInternal::QAudioPacketFeeder::QAudioPacketFeeder ( QAudioBufferList abl)
inline

Functions

◆ empty()

bool QtMultimediaInternal::QAudioPacketFeeder::empty ( ) const
inline

◆ feed()

bool QtMultimediaInternal::QAudioPacketFeeder::feed ( AudioBufferList &  dst,
UInt32 &  packetCount 
)
inline

Definition at line 194 of file qaudioinput_mac_p.cpp.

Referenced by QtMultimediaInternal::QAudioInputBuffer::converterCallback().

195  {
196  if (position == totalPackets) {
197  dst.mBuffers[0].mDataByteSize = 0;
198  packetCount = 0;
199  return false;
200  }
201 
202  if (totalPackets - position < packetCount)
203  packetCount = totalPackets - position;
204 
205  dst.mBuffers[0].mDataByteSize = packetCount * audioBufferList->packetSize();
206  dst.mBuffers[0].mData = audioBufferList->data() + (position * audioBufferList->packetSize());
207 
208  position += packetCount;
209 
210  return true;
211  }

Properties

◆ audioBufferList

QAudioBufferList* QtMultimediaInternal::QAudioPacketFeeder::audioBufferList
private

Definition at line 221 of file qaudioinput_mac_p.cpp.

◆ position

UInt32 QtMultimediaInternal::QAudioPacketFeeder::position
private

Definition at line 220 of file qaudioinput_mac_p.cpp.

◆ totalPackets

UInt32 QtMultimediaInternal::QAudioPacketFeeder::totalPackets
private

Definition at line 219 of file qaudioinput_mac_p.cpp.


The documentation for this class was generated from the following file: