Thanks for sharing the link. Testing it in our examples: fmodstudioapi20225ps4_sdk11.500-installer_147358\api\core\examples\vs2019\examples.sln → net_stream
I was able to hear the stream on our test machine.
Sure, here is my code. I’ve squished it into 1 function and checked it still comes up with the same error:
void Caudio::init()
{
// init core api
FMOD_RESULT result;
result = FMOD::System_Create(&system); // Create the main system object.
if (result != FMOD_OK)
{
showError("System_Create", result);
return;
}
// Set the DSP buffer size to 1024 samples
unsigned int bufferLength = 1024; // Number of samples per DSP processing callback
int numBuffers = 4; // Number of buffers (default is usually 4)
result = system->setDSPBufferSize(bufferLength, numBuffers);
if (result != FMOD_OK)
{
showError("setDSPBufferSize", result);
return;
}
result = system->init(512, FMOD_INIT_NORMAL, 0); // Initialize FMOD.
if (result != FMOD_OK)
{
showError("system->init", result);
return;
}
// Create music group
system->createChannelGroup("BHMusic", &musicChannelGroup);
// Test play radio station
result = system->createStream("http://yp.shoutcast.com/sbin/tunein-station.pls?id=99497996", FMOD_DEFAULT, NULL, &musicSound);
if (result != FMOD_OK)
{
showError("playMusicW HTTP", result);
return;
}
result = system->playSound(musicSound, musicChannelGroup, false, &musicChannel);
if (result != FMOD_OK)
{
showError("playMusicW - PlaySound", result);
return;
}
}
Could you please try updating the createStream() function with the following
memset(&exinfo, 0, sizeof(FMOD_CREATESOUNDEXINFO));
exinfo.cbsize = sizeof(FMOD_CREATESOUNDEXINFO);
exinfo.filebuffersize = 1024 * 16; /* Increase the default file chunk size to handle seeking inside large playlist files that may be over 2kb. */
// Test play radio station
result = system->createStream("http://yp.shoutcast.com/sbin/tunein-station.pls?id=99497996", FMOD_CREATESTREAM | FMOD_NONBLOCKING, &exinfo, &musicSound);
if (result != FMOD_OK)
{
showError("playMusicW HTTP", result);
return;
}