1
Audio / Re: Sending wav over TCP, serializing problem?
« on: February 28, 2018, 10:24:51 pm »
I took the Custom stream demo from the tutorial, it seems to work fine when loading and playing a buffer in the same program.
Maybe it's not working in the receiving end... other that the serializing thing, I was starting to ask myself if i was correctly "appending" SoundBuffer. I feel like I might simply be playing the same sample over and over.
Maybe it's not working in the receiving end... other that the serializing thing, I was starting to ask myself if i was correctly "appending" SoundBuffer. I feel like I might simply be playing the same sample over and over.
if((mAudioStream.getStatus() != AudioStream::Playing) && !mSamplesQueue.empty()) {
if(mSoundBuffer.loadFromSamples(
mSamplesQueue.front(),
BUFFER_SIZE/2, 1, 44100) )
{
mAudioStream.load(mSoundBuffer);
mAudioStream.play();
mSamplesQueue.pop_front();
}
}
if(mSoundBuffer.loadFromSamples(
mSamplesQueue.front(),
BUFFER_SIZE/2, 1, 44100) )
{
mAudioStream.load(mSoundBuffer);
mAudioStream.play();
mSamplesQueue.pop_front();
}
}