Ok so how many elements should I put to hear the sound ?
PS : I've put 10 000 elements in the vector but I can't heart anything.
#include <SFML/Audio.hpp>
int main(int argc, char* argv[]) {
std::vector<sf::Int16> samples;
for (unsigned int i = 0; i < 1000000; i++)
samples.push_back(1000);
sf::SoundBuffer buffer;
buffer.loadFromSamples(samples.data(),samples.size(),1,44100);
sf::Sound sound;
sound.setBuffer(buffer);
sound.setLoop(true);
sound.play();
while (true) {}
return 0;
}