Popping sounds with FMOD Core

Hey guys,
I’m using the CORE API to play older, 8-bit mono 11 kHz audio. I both stream this from disk as well as play from in memory. These are raw files, and the playback is working fine.

The issue I’m having is a large pop at consistent sound playback areas as well as (somewhat) arbitrary spots. Some of these sounds are looping, so are not.

I’ve verified the data and it’s legitimate (no popping built-in, etc).

I’m setting the volume to zero before I stop the channel. I was also releasing the sound as it’s not clear what is repeated and what is not (I create them on the fly and, like I said, everything else appears to work just fine). I tried not releasing the sound after the channel stopping and that really did nothing.

We do have these sound potentially stopped right before they would actually finish, but I don’t see how that in itself would cause popping.

I am seeing this kind of warning, though it doesn’t appear to be tied to the popping. They MIGHT be related but the messages themselves do not correspond to the popping):

[2219] ClFMODMgr::playCreatedSound() → Created channel [0x3a0015] from sound [0x209442b328]
[LOG] SystemI::createSoundInternal : Create data=0x2094588373, mode=0x00001808
[LOG] SystemI::createSoundInternal : exinfo->cbsize = 224
[LOG] SystemI::createSoundInternal : exinfo->length = 2506
[LOG] SystemI::createSoundInternal : exinfo->numchannels = 1
[LOG] SystemI::createSoundInternal : exinfo->defaultfrequency = 11025
[LOG] SystemI::createSoundInternal : exinfo->format = 1
[LOG] SystemI::createSoundInternal : Sample 0/0: name=’(null)’, format=1, channels=1, frequency=11025, lengthbytes=2506, lengthpcm=2506, pcmblocksize=0, loopstart=0, loopend=0, mode=0x00000000, channelmask=0x00000000, channelorder=0, peakvolume=0.000000.
[2233] ClFMODMgr::playCreatedSound() → Created channel [0x3c0089] from sound [0x209442b198]
ClFMODMgr::stopAndReleaseCreatedSound() → FMOD failed to stop the custom channel [0x3a0015] from sound [0x209442b328] as the channel handle was invalid!
[2235] ClFMODMgr::stopAndReleaseCreatedSound() → Stopping channel [0x3a0015] from sound [0x209442b328]

I’m using FMOD Core version 2.0.11. Is there a better way to debug this?

Thanks!

Matt

PS - This is on Switch.

I’d recommend loading your file into the Core API load_from_memory example and listen for any pops there. If that causes it to reproduce please send it our way and we can figure out what’s gone wrong. If it plays cleanly try to simplify your playback and compare against the example.

The invalid handle likely means you called stop on the channel, but it already naturally ended (reached the end).

Hey Mathew,
Ah, I forgot about the invalid handle indicating that the channel has run it’s course. I AM getting a couple of channel stealing notifications with only two channels being allocated (and a maximum of 32 from the initialize call), but that wasn’t the issue here.

When I put the data into the sample load_from_memory example there were pops, however, setting the volume to 0 before stopping (and, actually, suspending and resuming the mixer) seems to have fixed it. I think because the data is so old and, frankly, crappy that there are some VERY fast 0 dB to (whatever) dB transitions that the up-scaling of the bit-depth or something might be having a hard time.

Either way, that works! Thank you!

Matt