Changed the .ogg and .wav files used by the sound sample (7.5 Mo -> 300 Ko)
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1494 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
47d4fd0452
commit
007db7d39a
BIN
dotnet/samples/bin/datas/sound/canary.wav
Normal file
BIN
dotnet/samples/bin/datas/sound/canary.wav
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
dotnet/samples/bin/datas/sound/orchestral.ogg
Normal file
BIN
dotnet/samples/bin/datas/sound/orchestral.ogg
Normal file
Binary file not shown.
@ -26,10 +26,10 @@ namespace sample_sound
|
|||||||
private static void PlaySound()
|
private static void PlaySound()
|
||||||
{
|
{
|
||||||
// Load a sound buffer from a wav file
|
// Load a sound buffer from a wav file
|
||||||
SoundBuffer buffer = new SoundBuffer("datas/sound/footsteps.wav");
|
SoundBuffer buffer = new SoundBuffer("datas/sound/canary.wav");
|
||||||
|
|
||||||
// Display sound informations
|
// Display sound informations
|
||||||
Console.WriteLine("footsteps.wav :");
|
Console.WriteLine("canary.wav :");
|
||||||
Console.WriteLine(" " + buffer.Duration + " sec");
|
Console.WriteLine(" " + buffer.Duration + " sec");
|
||||||
Console.WriteLine(" " + buffer.SampleRate + " samples / sec");
|
Console.WriteLine(" " + buffer.SampleRate + " samples / sec");
|
||||||
Console.WriteLine(" " + buffer.ChannelsCount + " channels");
|
Console.WriteLine(" " + buffer.ChannelsCount + " channels");
|
||||||
@ -56,10 +56,10 @@ namespace sample_sound
|
|||||||
private static void PlayMusic()
|
private static void PlayMusic()
|
||||||
{
|
{
|
||||||
// Load an ogg music file
|
// Load an ogg music file
|
||||||
Music music = new Music("datas/sound/lepidoptera.ogg");
|
Music music = new Music("datas/sound/orchestral.ogg");
|
||||||
|
|
||||||
// Display music informations
|
// Display music informations
|
||||||
Console.WriteLine("lepidoptera.ogg :");
|
Console.WriteLine("orchestral.ogg :");
|
||||||
Console.WriteLine(" " + music.Duration + " sec");
|
Console.WriteLine(" " + music.Duration + " sec");
|
||||||
Console.WriteLine(" " + music.SampleRate + " samples / sec");
|
Console.WriteLine(" " + music.SampleRate + " samples / sec");
|
||||||
Console.WriteLine(" " + music.ChannelsCount + " channels");
|
Console.WriteLine(" " + music.ChannelsCount + " channels");
|
||||||
|
BIN
samples/bin/datas/sound/canary.wav
Normal file
BIN
samples/bin/datas/sound/canary.wav
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
samples/bin/datas/sound/orchestral.ogg
Normal file
BIN
samples/bin/datas/sound/orchestral.ogg
Normal file
Binary file not shown.
@ -15,11 +15,11 @@ void PlaySound()
|
|||||||
{
|
{
|
||||||
// Load a sound buffer from a wav file
|
// Load a sound buffer from a wav file
|
||||||
sf::SoundBuffer buffer;
|
sf::SoundBuffer buffer;
|
||||||
if (!buffer.LoadFromFile("datas/sound/footsteps.wav"))
|
if (!buffer.LoadFromFile("datas/sound/canary.wav"))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Display sound informations
|
// Display sound informations
|
||||||
std::cout << "footsteps.wav :" << std::endl;
|
std::cout << "canary.wav :" << std::endl;
|
||||||
std::cout << " " << buffer.GetDuration() << " sec" << std::endl;
|
std::cout << " " << buffer.GetDuration() << " sec" << std::endl;
|
||||||
std::cout << " " << buffer.GetSampleRate() << " samples / sec" << std::endl;
|
std::cout << " " << buffer.GetSampleRate() << " samples / sec" << std::endl;
|
||||||
std::cout << " " << buffer.GetChannelsCount() << " channels" << std::endl;
|
std::cout << " " << buffer.GetChannelsCount() << " channels" << std::endl;
|
||||||
@ -49,11 +49,11 @@ void PlayMusic()
|
|||||||
{
|
{
|
||||||
// Load an ogg music file
|
// Load an ogg music file
|
||||||
sf::Music music;
|
sf::Music music;
|
||||||
if (!music.OpenFromFile("datas/sound/lepidoptera.ogg"))
|
if (!music.OpenFromFile("datas/sound/orchestral.ogg"))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Display music informations
|
// Display music informations
|
||||||
std::cout << "lepidoptera.ogg :" << std::endl;
|
std::cout << "orchestral.ogg :" << std::endl;
|
||||||
std::cout << " " << music.GetDuration() << " sec" << std::endl;
|
std::cout << " " << music.GetDuration() << " sec" << std::endl;
|
||||||
std::cout << " " << music.GetSampleRate() << " samples / sec" << std::endl;
|
std::cout << " " << music.GetSampleRate() << " samples / sec" << std::endl;
|
||||||
std::cout << " " << music.GetChannelsCount() << " channels" << std::endl;
|
std::cout << " " << music.GetChannelsCount() << " channels" << std::endl;
|
||||||
|
Loading…
Reference in New Issue
Block a user