Corrected the name of some functions/variable

This commit is contained in:
Laurent Gomila 2011-12-25 23:42:43 +01:00
parent c817f882e6
commit aaa21dfaf6
32 changed files with 203 additions and 203 deletions

View file

@ -20,9 +20,9 @@ void PlaySound()
// Display sound informations
std::cout << "canary.wav :" << std::endl;
std::cout << " " << buffer.GetDuration() / 1000.f << " seconds" << std::endl;
std::cout << " " << buffer.GetSampleRate() << " samples / sec" << std::endl;
std::cout << " " << buffer.GetChannelsCount() << " channels" << std::endl;
std::cout << " " << buffer.GetDuration() / 1000.f << " seconds" << std::endl;
std::cout << " " << buffer.GetSampleRate() << " samples / sec" << std::endl;
std::cout << " " << buffer.GetChannelCount() << " channels" << std::endl;
// Create a sound instance and play it
sf::Sound sound(buffer);
@ -57,7 +57,7 @@ void PlayMusic()
std::cout << "orchestral.ogg :" << std::endl;
std::cout << " " << music.GetDuration() / 1000.f << " seconds" << std::endl;
std::cout << " " << music.GetSampleRate() << " samples / sec" << std::endl;
std::cout << " " << music.GetChannelsCount() << " channels" << std::endl;
std::cout << " " << music.GetChannelCount() << " channels" << std::endl;
// Play it
music.Play();

View file

@ -46,9 +46,9 @@ int main()
// Display captured sound informations
std::cout << "Sound information :" << std::endl;
std::cout << " " << buffer.GetDuration() / 1000.f << " seconds" << std::endl;
std::cout << " " << buffer.GetSampleRate() << " samples / seconds" << std::endl;
std::cout << " " << buffer.GetChannelsCount() << " channels" << std::endl;
std::cout << " " << buffer.GetDuration() / 1000.f << " seconds" << std::endl;
std::cout << " " << buffer.GetSampleRate() << " samples / seconds" << std::endl;
std::cout << " " << buffer.GetChannelCount() << " channels" << std::endl;
// Choose what to do with the recorded sound data
char choice;

View file

@ -55,12 +55,12 @@ private :
/// /see SoundRecorder::ProcessSamples
///
////////////////////////////////////////////////////////////
virtual bool OnProcessSamples(const sf::Int16* samples, std::size_t samplesCount)
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, samplesCount * sizeof(sf::Int16));
packet.Append(samples, sampleCount * sizeof(sf::Int16));
// Send the audio packet to the server
return mySocket.Send(packet) == sf::Socket::Done;

View file

@ -103,7 +103,7 @@ private :
////////////////////////////////////////////////////////////
virtual void OnSeek(sf::Uint32 timeOffset)
{
myOffset = timeOffset * GetSampleRate() * GetChannelsCount() / 1000;
myOffset = timeOffset * GetSampleRate() * GetChannelCount() / 1000;
}
////////////////////////////////////////////////////////////
@ -129,7 +129,7 @@ private :
const sf::Int16* samples = reinterpret_cast<const sf::Int16*>(packet.GetData() + 1);
std::size_t nbSamples = (packet.GetDataSize() - 1) / sizeof(sf::Int16);
// Don't forget that the other thread can access the samples array at any time
// Don't forget that the other thread can access the sample array at any time
// (so we protect any operation on it with the mutex)
{
sf::Lock lock(myMutex);