MCPcopy Create free account
hub / github.com/SFML/SFML / onProcessSamples

Method onProcessSamples

examples/voip/Client.cpp:71–80  ·  view source on GitHub ↗

/////////////////////////////////////////////////////// \see SoundRecorder::onProcessSamples ///////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

appendMethod · 0.45
sendMethod · 0.45

Tested by

no test coverage detected