/////////////////////////////////////////////////////// \see SoundRecorder::onProcessSamples ///////////////////////////////////////////////////////
| 69 | /// |
| 70 | //////////////////////////////////////////////////////////// |
| 71 | bool onProcessSamples(const std::int16_t* samples, std::size_t sampleCount) override |
| 72 | { |
| 73 | // Pack the audio samples into a network packet |
| 74 | sf::Packet packet; |
| 75 | packet << clientAudioData; |
| 76 | packet.append(samples, sampleCount * sizeof(std::int16_t)); |
| 77 | |
| 78 | // Send the audio packet to the server |
| 79 | return m_socket.send(packet) == sf::Socket::Status::Done; |
| 80 | } |
| 81 | |
| 82 | //////////////////////////////////////////////////////////// |
| 83 | /// \see SoundRecorder::onStop |