Lines Matching refs:bus

34 // Pushes audio bus objects to a FIFO and fill it up to different degrees.
41 scoped_ptr<AudioBus> bus = AudioBus::Create(kChannels, kMaxFrameCount / 2);
43 fifo.Push(bus.get());
44 EXPECT_EQ(fifo.frames(), bus->frames());
49 scoped_ptr<AudioBus> bus = AudioBus::Create(kChannels, kMaxFrameCount);
51 fifo.Push(bus.get());
52 EXPECT_EQ(fifo.frames(), bus->frames());
57 // Consumes audio bus objects from a FIFO and empty it to different degrees.
63 scoped_ptr<AudioBus> bus = AudioBus::Create(kChannels, kMaxFrameCount);
64 fifo.Push(bus.get());
69 scoped_ptr<AudioBus> bus = AudioBus::Create(kChannels, kMaxFrameCount / 2);
70 fifo.Consume(bus.get(), 0, bus->frames());
71 EXPECT_TRUE(fifo.frames() == bus->frames());
72 fifo.Push(bus.get());
77 scoped_ptr<AudioBus> bus = AudioBus::Create(kChannels, kMaxFrameCount);
78 fifo.Consume(bus.get(), 0, bus->frames());
80 fifo.Push(bus.get());
86 // appending and removing audio bus elements to/from the FIFO.
94 scoped_ptr<AudioBus> bus = AudioBus::Create(kChannels, 1);
97 fifo.Push(bus.get());
105 fifo.Consume(bus.get(), 0, bus->frames());
135 scoped_ptr<AudioBus> bus = AudioBus::Create(kChannels, kFrameCount);
137 EXPECT_EQ(bus->frames(), kFrameCount);
144 for (int j = 0; j < bus->channels(); ++j)
145 std::fill(bus->channel(j), bus->channel(j) + bus->frames(), value);
146 fifo.Push(bus.get());
147 EXPECT_EQ(fifo.frames(), bus->frames() * value);
156 // order. Note that we set |frames_to_consume| to half the size of the bus.
160 const int frames_to_consume = bus->frames() / 2;
162 fifo.Consume(bus.get(), 0, frames_to_consume);
163 for (int j = 0; j < bus->channels(); ++j)
164 VerifyValue(bus->channel(j), frames_to_consume, value);
172 // Push one audio bus to the FIFO and fill it with 1's.
174 for (int j = 0; j < bus->channels(); ++j)
175 std::fill(bus->channel(j), bus->channel(j) + bus->frames(), value);
176 fifo.Push(bus.get());
177 EXPECT_EQ(fifo.frames(), bus->frames());
183 fifo.Consume(bus.get(), 0, bus->frames());
184 for (int j = 0; j < bus->channels(); ++j) {
185 VerifyValue(bus->channel(j), bus->channels(), value);
186 std::fill(bus->channel(j), bus->channel(j) + bus->frames(), value + 1);
188 fifo.Push(bus.get());
189 EXPECT_EQ(fifo.frames(), bus->frames());