Changed the naming convention for public member variables/functions and free functions (using lowerCase instead of UpperCase)
This commit is contained in:
parent
ff5b69d312
commit
14ac411542
200 changed files with 4302 additions and 4320 deletions
|
@ -38,9 +38,9 @@ private :
|
|||
/// /see SoundRecorder::OnStart
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
virtual bool OnStart()
|
||||
virtual bool onStart()
|
||||
{
|
||||
if (m_socket.Connect(m_host, m_port) == sf::Socket::Done)
|
||||
if (m_socket.connect(m_host, m_port) == sf::Socket::Done)
|
||||
{
|
||||
std::cout << "Connected to server " << m_host << std::endl;
|
||||
return true;
|
||||
|
@ -55,30 +55,30 @@ private :
|
|||
/// /see SoundRecorder::ProcessSamples
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
virtual bool OnProcessSamples(const sf::Int16* samples, std::size_t sampleCount)
|
||||
virtual bool onProcessSamples(const sf::Int16* samples, std::size_t sampleCount)
|
||||
{
|
||||
// Pack the audio samples into a network packet
|
||||
sf::Packet packet;
|
||||
packet << audioData;
|
||||
packet.Append(samples, sampleCount * sizeof(sf::Int16));
|
||||
packet.append(samples, sampleCount * sizeof(sf::Int16));
|
||||
|
||||
// Send the audio packet to the server
|
||||
return m_socket.Send(packet) == sf::Socket::Done;
|
||||
return m_socket.send(packet) == sf::Socket::Done;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// /see SoundRecorder::OnStop
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
virtual void OnStop()
|
||||
virtual void onStop()
|
||||
{
|
||||
// Send a "end-of-stream" packet
|
||||
sf::Packet packet;
|
||||
packet << endOfStream;
|
||||
m_socket.Send(packet);
|
||||
m_socket.send(packet);
|
||||
|
||||
// Close the socket
|
||||
m_socket.Disconnect();
|
||||
m_socket.disconnect();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
|
@ -95,10 +95,10 @@ private :
|
|||
/// start sending him audio data
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
void DoClient(unsigned short port)
|
||||
void doClient(unsigned short port)
|
||||
{
|
||||
// Check that the device can capture audio
|
||||
if (sf::SoundRecorder::IsAvailable() == false)
|
||||
if (sf::SoundRecorder::isAvailable() == false)
|
||||
{
|
||||
std::cout << "Sorry, audio capture is not supported by your system" << std::endl;
|
||||
return;
|
||||
|
@ -122,8 +122,8 @@ void DoClient(unsigned short port)
|
|||
std::cin.ignore(10000, '\n');
|
||||
|
||||
// Start capturing audio data
|
||||
recorder.Start(44100);
|
||||
recorder.start(44100);
|
||||
std::cout << "Recording... press enter to stop";
|
||||
std::cin.ignore(10000, '\n');
|
||||
recorder.Stop();
|
||||
recorder.stop();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue