| 268 | void VideoStream::stopVideo() { _isPlaying = false; } |
| 269 | |
| 270 | short VideoStream::getAudioSample() { |
| 271 | uint8_t data[2] = {}; |
| 272 | _ringBuffer.readData(std::span(data, 2)); |
| 273 | auto sample = static_cast<int16_t>(static_cast<uint16_t>(data[0] & 0xFF) | static_cast<uint16_t>(data[1]) << 8); |
| 274 | if (_separateAudio) { |
| 275 | sample += _separateAudio->getSample(); |
| 276 | } |
| 277 | return sample; |
| 278 | } |
| 279 | |
| 280 | bool VideoStream::getIsPlaying() const { return _isPlaying; } |
| 281 |
no test coverage detected