If anyone is a bit bored and wants to investigate, I currently lack the time.
Windows 10
SFML master
Tested with: VS 2015, MinGW Builds GCC 5.3.0
Used code:
#include <SFML/Audio.hpp>
#include <iostream>
int main()
{
sf::SoundBuffer buf;
buf.loadFromFile("ff.ogg");
std::vector<sf::Int16> samples(buf.getSampleCount());
std::cout << "Memory allocated\n";
for(std::size_t i = 0; i < buf.getSampleCount(); i++)
{
samples[i] = buf.getSamples()[i];
}
sf::SoundBuffer buff;
buff.loadFromSamples(samples.data(), buf.getSampleCount(), buf.getChannelCount(), buf.getSampleRate());
std::cout << "Loading new buffer.\n";
buff.saveToFile("ff-test.ogg");
std::cout << "Data written\n";
}
Call stack (from VS 2015):
SupportVS.exe!_chkstk() Line 99
SupportVS.exe!_vorbis_analysis_wrote()
SupportVS.exe!sf::priv::SoundFileWriterOgg::write(const short * samples, unsigned __int64 count) Line 144
SupportVS.exe!sf::OutputSoundFile::write(const short * samples, unsigned __int64 count) Line 76
SupportVS.exe!sf::SoundBuffer::saveToFile(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & filename) Line 153
SupportVS.exe!main() Line 22
Used sound file:
ff.ogg [1.25 MiB]
Have fun debugging.
![Wink ;)](https://www.sfml-dev.org/forums/Smileys/default/wink.gif)