Home | History | Annotate | Download | only in client

Lines Matching full:packet

34 void AudioPlayer::ProcessAudioPacket(scoped_ptr<AudioPacket> packet) {
35 CHECK_EQ(1, packet->data_size());
36 DCHECK_EQ(AudioPacket::ENCODING_RAW, packet->encoding());
37 DCHECK_NE(AudioPacket::SAMPLING_RATE_INVALID, packet->sampling_rate());
38 DCHECK_EQ(kSampleSizeBytes, packet->bytes_per_sample());
39 DCHECK_EQ(static_cast<int>(kChannels), packet->channels());
40 DCHECK_EQ(packet->data(0).size() % (kChannels * kSampleSizeBytes), 0u);
47 // Start the Pepper audio player if this is the first packet.
48 if (sampling_rate_ != packet->sampling_rate()) {
56 sampling_rate_ = packet->sampling_rate();
66 queued_bytes_ += packet->data(0).size();
67 queued_packets_.push_back(packet.release());
109 // Check if we've run out of samples for this packet.
115 // Pop off the packet if we've already consumed all its bytes.