Custom DSP, Copy to Side Buffer

Hi,

I have been trying to write a custom DSP in C# to capture PCM data in a side buffer, however, my attempts so far just lead to crashing the audio and also Unity when I stop the game.

Below is an example of what I am trying to achieve in the ReadCallback of the DSP:

public RESULT ReadCallback(ref DSP_STATE dspState, IntPtr inBuffer, IntPtr outBuffer, uint length, int inChannels, ref int outChannels)
{
    uint count = 0;
    int count2 = 0;

    if (sideBuffer.Length < length * inChannels)
        sideBuffer = new float[length * inChannels];

    unsafe
    {
        float* inBufferPtr = (float*)inBuffer.ToPointer();
        float* outBufferPtr = (float*)outBuffer.ToPointer();

        for (count = 0; count < length; count++)
        {
            for (count2 = 0; count2 < outChannels; count2++)
            {
                outBufferPtr[(count * outChannels) + count2] = inBufferPtr[(count * inChannels) + count2];
                // copy to side buffer
                sideBuffer[(count * outChannels) + count2] = outBufferPtr[(count * outChannels) + count2];
            }
        }
    }

    return RESULT.OK;
}

Apologies, it looks like this question was missed some how.

Are you able to share the logs from the crash?

No worries Cameron,

It sometimes but not always crashes with:

[LOG] ProfileClient::markForDead               : Closing client connection
[LOG] Thread::callback                         : FMOD profiler thread (recv) finished.
[LOG] Thread::callback                         : FMOD profiler thread (send) finished.

Full Log is below:

[LOG] System::create                           : Header version = 1.10.00. Current version = 1.10.00.
[LOG] SystemI::setOutputInternal               : Setting output to type 0
[LOG] Manager::init                            : maxchannels = 1024 studioflags = 00000009 flags 00000000 extradriverdata 0000000000000000.
[LOG] SystemI::init                            : FMOD Studio Version: 00011000 (90329)
[LOG] SystemI::init                            : maxchannels = 1024, flags = 00030000, extradriverdata = 0000000000000000
[LOG] SystemI::setOutputInternal               : Setting output to type 8
[LOG] SystemI::setOutputInternal               : Setting output to type 8
[LOG] SystemI::setOutputInternal               : Setting output to type 8
[LOG] OutputWASAPI::init                       : Mix Format (WAVEFORMATEX): wFormatTag=0xFFFE, nChannels=8, nSamplesPerSec=48000, nAvgBytesPerSec=1536000, nBlockAlign=32, wBitsPerSample=32, cbSize=22.
[LOG] OutputWASAPI::init                       : Mix Format (WAVEFORMATEXTENSIBLE): wValidBitsPerSample=32, dwChannelMask=0x0000063F, SubFormat=00000003-0000-0010-8000-00AA00389B71.
[LOG] OutputWASAPI::init                       : Output buffer size: 4096 samples, latency: 0.00ms, period: 10.00ms, DSP buffer: 1024 * 4
[LOG] SystemI::init                            : Create master channel group and master sound group.
[LOG] DownMix::init                            : dspbuffersize: 1024  rate: 48000. output speaker mode: 7, input speaker mode 3
[LOG] DownMix::init                            : done.
[LOG] SystemI::init                            : Set up emulated output.  1024 channels
[LOG] SystemI::init                            : create the channel pool
[LOG] SystemI::init                            : create the stream thread
[LOG] Thread::initThread                       : Init FMOD stream thread. Priority: 2, Stack Size: 65536, Semaphore: No, Sleep Time: 10, Looping: Yes.
[LOG] SystemI::DSPCodecPoolRegister            : register codec pool for pool type 5
[LOG] Thread::initThread                       : Init FMOD mixer thread. Priority: 3, Stack Size: 49152, Semaphore: No, Sleep Time: 0, Looping: Yes.
[LOG] AsyncManager::init                       : manager 000000004D98E528 isAsync 1 updatePeriod 0.02
[LOG] Thread::initThread                       : Init FMOD Studio update thread. Priority: 0, Stack Size: 65536, Semaphore: No, Sleep Time: 1, Looping: No.
[LOG] AsyncManager::init                       : done
[LOG] PlaybackSystem::init                     : 
[LOG] Thread::initThread                       : Init FMOD Studio sample load thread. Priority: 0, Stack Size: 65536, Semaphore: No, Sleep Time: 1, Looping: No.
[LOG] PlaybackSystem::init                     : done
[LOG] LiveUpdate::init                         : 
[LOG] Thread::initThread                       : Init FMOD Studio bank load thread. Priority: 0, Stack Size: 65536, Semaphore: No, Sleep Time: 1, Looping: No.
[LOG] Manager::init                            : done.
[LOG] Profile::init                            : Profiler listening on port: 9264
[LOG] Manager::readBank                        : fileversion = 99, compatVersion = 99 (oldest = 44, newest = 99)
[LOG] Manager::readBank                        : fileversion = 99, compatVersion = 99 (oldest = 44, newest = 99)
[LOG] PlaybackSystem::acquireMasterBus         : Setting master channel group format to 6
[LOG] Thread::initThread                       : Init FMOD profiler thread (recv). Priority: 0, Stack Size: 131072, Semaphore: No, Sleep Time: 0, Looping: No.
[LOG] Thread::initThread                       : Init FMOD profiler thread (send). Priority: 0, Stack Size: 131072, Semaphore: No, Sleep Time: 0, Looping: No.
[LOG] LiveUpdate::clientConnected              : client = 0000000011BA6328
[LOG] SystemI::createSoundInternal             : filename =  : mode 02000202
[LOG] SystemI::createSoundInternal             : exinfo->cbsize             = 232
[LOG] SystemI::createSoundInternal             : exinfo->length             = 43606784
[LOG] SystemI::createSoundInternal             : exinfo->fileoffset         = 3972512
[LOG] SystemI::createSoundInternal             : exinfo->numsubsounds       = 1
[LOG] SystemI::createSoundInternal             : exinfo->inclusionlist      = 00000000733BF5FC
[LOG] SystemI::createSoundInternal             : exinfo->inclusionlistnum   = 1
[LOG] SystemI::createSoundInternal             : exinfo->suggestedsoundtype = 5
[LOG] SystemI::createSoundInternal             : exinfo->useropen           = 00007FFEF1665C70
[LOG] SystemI::createSoundInternal             : exinfo->userclose          = 00007FFEF1665C40
[LOG] SystemI::createSoundInternal             : exinfo->userread           = 00007FFEF1665D40
[LOG] SystemI::createSoundInternal             : exinfo->userseek           = 00007FFEF1665DF0
[LOG] SystemI::createSoundInternal             : exinfo->fileuserdata       = 000000005F548978
[LOG] SystemI::createSoundInternal             : exinfo->initialseekpostype = 1
[LOG] SystemI::DSPCodecPoolRegister            : register codec pool for pool type 5
[LOG] SystemI::createSoundInternal             : Format has 1 subsounds.
[LOG] SystemI::createSoundInternal             : Create as FMOD_CREATESAMPLE
[LOG] SystemI::createSoundInternal             : Multi-sample sound (1 subsounds), create a sample container.
[LOG] SystemI::createSoundInternal             : creating subsound 0/1
[LOG] SystemI::createSample                    : mode 02000202 length 275375 samples, lengthbytes 60128
[LOG] SystemI::createSample                    : channels = 2
[LOG] SystemI::createSample                    : output = 00000000669DA078
[LOG] OutputSoftware::createSample             : lengthpcm 275375, lengthbytes 60128, channels 2, format 2, freq 48000, mode 0200020a
[LOG] SystemI::createSoundInternal             : No name found in file, use filename.
[LOG] SystemI::createSoundInternal             : done.  OpenState now = FMOD_OPENSTATE_READY.

[LOG] SystemI::createSound                     : filename = **************************************************************************/Master Bank.bank : mode 02010082
[LOG] SystemI::createSound                     : FMOD_NONBLOCKING specified.  Putting into queue to be opened asynchronously!
[LOG] Thread::initThread                       : Init FMOD nonblocking thread (0). Priority: 1, Stack Size: 81920, Semaphore: Yes, Sleep Time: 0, Looping: Yes.
[LOG] SystemI::createSound                     : setdata soundi = 000000004E654CA8 : node = 0000000060052AD0
[LOG] SystemI::createSound                     : add node to async list : head = 000000004E3FA058.  list count = 0
[LOG] AsyncThread::threadFunc                  : Starting Asynchronous operation on sound 000000004E654CA8
[LOG] SystemI::createSoundInternal             :     filename = **************************************************************************/Master Bank.bank : mode 02010082
[LOG] SystemI::createSoundInternal             :     exinfo->cbsize             = 232
[LOG] SystemI::createSoundInternal             :     exinfo->length             = 43606784
[LOG] SystemI::createSoundInternal             :     exinfo->fileoffset         = 3972512
[LOG] SystemI::createSoundInternal             :     exinfo->numsubsounds       = 1
[LOG] SystemI::createSoundInternal             :     exinfo->inclusionlist      = 0000000060052BE8
[LOG] SystemI::createSoundInternal             :     exinfo->inclusionlistnum   = 1
[LOG] SystemI::createSoundInternal             :     exinfo->suggestedsoundtype = 5
[LOG] SystemI::createSoundInternal             :     exinfo->initialseekpostype = 1
[LOG] SystemI::createSoundInternal             :     Format has 1 subsounds.
[LOG] SystemI::createSoundInternal             :     Create as FMOD_CREATESTREAM
[LOG] System::createSoundInternal              :     decode buffersize = 19200 : blocksize = 256 : format = 2
[LOG] SystemI::createSample                    :     mode 02010082 length 19200 samples, lengthbytes 153952
[LOG] SystemI::createSample                    :     channels = 2
[LOG] SystemI::createSample                    :     output = 00000000669DA078
[LOG] OutputSoftware::createSample             :     lengthpcm 19200, lengthbytes 153952, channels 2, format 2, freq 48000, mode 0201008a
[LOG] System::createSoundInternal              :     1 subsounds detected.
[LOG] System::createSoundInternal              :     Seek stream to start
[LOG] System::createSoundInternal              :     flush stream buffer
[LOG] System::createSoundInternal              :     flush successful.
[LOG] System::createSoundInternal              :     switch file handle from small blocking single buffered to large nonblocking doublebuffered.
[LOG] Thread::initThread                       :         Init FMOD file thread. Priority: 1, Stack Size: 16384, Semaphore: No, Sleep Time: 10, Looping: Yes.
[LOG] SystemI::createSoundInternal             :     done.  OpenState now = FMOD_OPENSTATE_READY.

[LOG] AsyncThread::threadFunc                  : Finished Asynchronous operation on sound 000000004E654CA8
[LOG] SoundI::getSubSound                      : sound 000000004E654CA8.  Subsound index 0 / 1
[LOG] SystemI::createSoundInternal             : filename =  : mode 02000202
[LOG] SystemI::createSoundInternal             : exinfo->cbsize             = 232
[LOG] SystemI::createSoundInternal             : exinfo->length             = 43606784
[LOG] SystemI::createSoundInternal             : exinfo->fileoffset         = 3972512
[LOG] SystemI::createSoundInternal             : exinfo->numsubsounds       = 1
[LOG] SystemI::createSoundInternal             : exinfo->inclusionlist      = 00000000733BF5FC
[LOG] SystemI::createSoundInternal             : exinfo->inclusionlistnum   = 1
[LOG] SystemI::createSoundInternal             : exinfo->suggestedsoundtype = 5
[LOG] SystemI::createSoundInternal             : exinfo->useropen           = 00007FFEF1665C70
[LOG] SystemI::createSoundInternal             : exinfo->userclose          = 00007FFEF1665C40
[LOG] SystemI::createSoundInternal             : exinfo->userread           = 00007FFEF1665D40
[LOG] SystemI::createSoundInternal             : exinfo->userseek           = 00007FFEF1665DF0
[LOG] SystemI::createSoundInternal             : exinfo->fileuserdata       = 000000005F543F18
[LOG] SystemI::createSoundInternal             : exinfo->initialseekpostype = 1
[LOG] SystemI::DSPCodecPoolRegister            : register codec pool for pool type 5
[LOG] SystemI::createSoundInternal             : Format has 1 subsounds.
[LOG] SystemI::createSoundInternal             : Create as FMOD_CREATESAMPLE
[LOG] SystemI::createSoundInternal             : Multi-sample sound (1 subsounds), create a sample container.
[LOG] SystemI::createSoundInternal             : creating subsound 0/1
[LOG] SystemI::createSample                    : mode 02000202 length 15048 samples, lengthbytes 4608
[LOG] SystemI::createSample                    : channels = 2
[LOG] SystemI::createSample                    : output = 00000000669DA078
[LOG] OutputSoftware::createSample             : lengthpcm 15048, lengthbytes 4608, channels 2, format 2, freq 48000, mode 0200020a
[LOG] SystemI::createSoundInternal             : No name found in file, use filename.
[LOG] SystemI::createSoundInternal             : done.  OpenState now = FMOD_OPENSTATE_READY.

[LOG] SystemI::createSoundInternal             : filename =  : mode 02000202
[LOG] SystemI::createSoundInternal             : exinfo->cbsize             = 232
[LOG] SystemI::createSoundInternal             : exinfo->length             = 43606784
[LOG] SystemI::createSoundInternal             : exinfo->fileoffset         = 3972512
[LOG] SystemI::createSoundInternal             : exinfo->numsubsounds       = 1
[LOG] SystemI::createSoundInternal             : exinfo->inclusionlist      = 00000000733BF5FC
[LOG] SystemI::createSoundInternal             : exinfo->inclusionlistnum   = 1
[LOG] SystemI::createSoundInternal             : exinfo->suggestedsoundtype = 5
[LOG] SystemI::createSoundInternal             : exinfo->useropen           = 00007FFEF1665C70
[LOG] SystemI::createSoundInternal             : exinfo->userclose          = 00007FFEF1665C40
[LOG] SystemI::createSoundInternal             : exinfo->userread           = 00007FFEF1665D40
[LOG] SystemI::createSoundInternal             : exinfo->userseek           = 00007FFEF1665DF0
[LOG] SystemI::createSoundInternal             : exinfo->fileuserdata       = 000000005F543F18
[LOG] SystemI::createSoundInternal             : exinfo->initialseekpostype = 1
[LOG] SystemI::DSPCodecPoolRegister            : register codec pool for pool type 5
[LOG] SystemI::createSoundInternal             : Format has 1 subsounds.
[LOG] SystemI::createSoundInternal             : Create as FMOD_CREATESAMPLE
[LOG] SystemI::createSoundInternal             : Multi-sample sound (1 subsounds), create a sample container.
[LOG] SystemI::createSoundInternal             : creating subsound 0/1
[LOG] SystemI::createSample                    : mode 02000202 length 15604 samples, lengthbytes 4768
[LOG] SystemI::createSample                    : channels = 2
[LOG] SystemI::createSample                    : output = 00000000669DA078
[LOG] OutputSoftware::createSample             : lengthpcm 15604, lengthbytes 4768, channels 2, format 2, freq 48000, mode 0200020a
[LOG] SystemI::createSoundInternal             : No name found in file, use filename.
[LOG] SystemI::createSoundInternal             : done.  OpenState now = FMOD_OPENSTATE_READY.

[LOG] SystemI::createSoundInternal             : filename =  : mode 02000202
[LOG] SystemI::createSoundInternal             : exinfo->cbsize             = 232
[LOG] SystemI::createSoundInternal             : exinfo->length             = 43606784
[LOG] SystemI::createSoundInternal             : exinfo->fileoffset         = 3972512
[LOG] SystemI::createSoundInternal             : exinfo->numsubsounds       = 1
[LOG] SystemI::createSoundInternal             : exinfo->inclusionlist      = 00000000733BF5FC
[LOG] SystemI::createSoundInternal             : exinfo->inclusionlistnum   = 1
[LOG] SystemI::createSoundInternal             : exinfo->suggestedsoundtype = 5
[LOG] SystemI::createSoundInternal             : exinfo->useropen           = 00007FFEF1665C70
[LOG] SystemI::createSoundInternal             : exinfo->userclose          = 00007FFEF1665C40
[LOG] SystemI::createSoundInternal             : exinfo->userread           = 00007FFEF1665D40
[LOG] SystemI::createSoundInternal             : exinfo->userseek           = 00007FFEF1665DF0
[LOG] SystemI::createSoundInternal             : exinfo->fileuserdata       = 000000005F543F18
[LOG] SystemI::createSoundInternal             : exinfo->initialseekpostype = 1
[LOG] SystemI::DSPCodecPoolRegister            : register codec pool for pool type 5
[LOG] SystemI::createSoundInternal             : Format has 1 subsounds.
[LOG] SystemI::createSoundInternal             : Create as FMOD_CREATESAMPLE
[LOG] SystemI::createSoundInternal             : Multi-sample sound (1 subsounds), create a sample container.
[LOG] SystemI::createSoundInternal             : creating subsound 0/1
[LOG] SystemI::createSample                    : mode 02000202 length 16459 samples, lengthbytes 4896
[LOG] SystemI::createSample                    : channels = 2
[LOG] SystemI::createSample                    : output = 00000000669DA078
[LOG] OutputSoftware::createSample             : lengthpcm 16459, lengthbytes 4896, channels 2, format 2, freq 48000, mode 0200020a
[LOG] SystemI::createSoundInternal             : No name found in file, use filename.
[LOG] SystemI::createSoundInternal             : done.  OpenState now = FMOD_OPENSTATE_READY.

[LOG] SystemI::createSoundInternal             : filename =  : mode 02000202
[LOG] SystemI::createSoundInternal             : exinfo->cbsize             = 232
[LOG] SystemI::createSoundInternal             : exinfo->length             = 43606784
[LOG] SystemI::createSoundInternal             : exinfo->fileoffset         = 3972512
[LOG] SystemI::createSoundInternal             : exinfo->numsubsounds       = 1
[LOG] SystemI::createSoundInternal             : exinfo->inclusionlist      = 00000000733BF5FC
[LOG] SystemI::createSoundInternal             : exinfo->inclusionlistnum   = 1
[LOG] SystemI::createSoundInternal             : exinfo->suggestedsoundtype = 5
[LOG] SystemI::createSoundInternal             : exinfo->useropen           = 00007FFEF1665C70
[LOG] SystemI::createSoundInternal             : exinfo->userclose          = 00007FFEF1665C40
[LOG] SystemI::createSoundInternal             : exinfo->userread           = 00007FFEF1665D40
[LOG] SystemI::createSoundInternal             : exinfo->userseek           = 00007FFEF1665DF0
[LOG] SystemI::createSoundInternal             : exinfo->fileuserdata       = 000000005F543F18
[LOG] SystemI::createSoundInternal             : exinfo->initialseekpostype = 1
[LOG] SystemI::DSPCodecPoolRegister            : register codec pool for pool type 5
[LOG] SystemI::createSoundInternal             : Format has 1 subsounds.
[LOG] SystemI::createSoundInternal             : Create as FMOD_CREATESAMPLE
[LOG] SystemI::createSoundInternal             : Multi-sample sound (1 subsounds), create a sample container.
[LOG] SystemI::createSoundInternal             : creating subsound 0/1
[LOG] SystemI::createSample                    : mode 02000202 length 16225 samples, lengthbytes 3840
[LOG] SystemI::createSample                    : channels = 2
[LOG] SystemI::createSample                    : output = 00000000669DA078
[LOG] OutputSoftware::createSample             : lengthpcm 16225, lengthbytes 3840, channels 2, format 2, freq 48000, mode 0200020a
[LOG] SystemI::createSoundInternal             : No name found in file, use filename.
[LOG] SystemI::createSoundInternal             : done.  OpenState now = FMOD_OPENSTATE_READY.

[LOG] SystemI::createSoundInternal             : filename =  : mode 02000202
[LOG] SystemI::createSoundInternal             : exinfo->cbsize             = 232
[LOG] SystemI::createSoundInternal             : exinfo->length             = 43606784
[LOG] SystemI::createSoundInternal             : exinfo->fileoffset         = 3972512
[LOG] SystemI::createSoundInternal             : exinfo->numsubsounds       = 1
[LOG] SystemI::createSoundInternal             : exinfo->inclusionlist      = 00000000733BF5FC
[LOG] SystemI::createSoundInternal             : exinfo->inclusionlistnum   = 1
[LOG] SystemI::createSoundInternal             : exinfo->suggestedsoundtype = 5
[LOG] SystemI::createSoundInternal             : exinfo->useropen           = 00007FFEF1665C70
[LOG] SystemI::createSoundInternal             : exinfo->userclose          = 00007FFEF1665C40
[LOG] SystemI::createSoundInternal             : exinfo->userread           = 00007FFEF1665D40
[LOG] SystemI::createSoundInternal             : exinfo->userseek           = 00007FFEF1665DF0
[LOG] SystemI::createSoundInternal             : exinfo->fileuserdata       = 000000005F543F18
[LOG] SystemI::createSoundInternal             : exinfo->initialseekpostype = 1
[LOG] SystemI::DSPCodecPoolRegister            : register codec pool for pool type 5
[LOG] SystemI::createSoundInternal             : Format has 1 subsounds.
[LOG] SystemI::createSoundInternal             : Create as FMOD_CREATESAMPLE
[LOG] SystemI::createSoundInternal             : Multi-sample sound (1 subsounds), create a sample container.
[LOG] SystemI::createSoundInternal             : creating subsound 0/1
[LOG] SystemI::createSample                    : mode 02000202 length 13386 samples, lengthbytes 4224
[LOG] SystemI::createSample                    : channels = 2
[LOG] SystemI::createSample                    : output = 00000000669DA078
[LOG] OutputSoftware::createSample             : lengthpcm 13386, lengthbytes 4224, channels 2, format 2, freq 48000, mode 0200020a
[LOG] SystemI::createSoundInternal             : No name found in file, use filename.
[LOG] SystemI::createSoundInternal             : done.  OpenState now = FMOD_OPENSTATE_READY.

[LOG] SystemI::createSoundInternal             : filename =  : mode 02000202
[LOG] SystemI::createSoundInternal             : exinfo->cbsize             = 232
[LOG] SystemI::createSoundInternal             : exinfo->length             = 43606784
[LOG] SystemI::createSoundInternal             : exinfo->fileoffset         = 3972512
[LOG] SystemI::createSoundInternal             : exinfo->numsubsounds       = 1
[LOG] SystemI::createSoundInternal             : exinfo->inclusionlist      = 00000000733BF5FC
[LOG] SystemI::createSoundInternal             : exinfo->inclusionlistnum   = 1
[LOG] SystemI::createSoundInternal             : exinfo->suggestedsoundtype = 5
[LOG] SystemI::createSoundInternal             : exinfo->useropen           = 00007FFEF1665C70
[LOG] SystemI::createSoundInternal             : exinfo->userclose          = 00007FFEF1665C40
[LOG] SystemI::createSoundInternal             : exinfo->userread           = 00007FFEF1665D40
[LOG] SystemI::createSoundInternal             : exinfo->userseek           = 00007FFEF1665DF0
[LOG] SystemI::createSoundInternal             : exinfo->fileuserdata       = 000000005F5491F8
[LOG] SystemI::createSoundInternal             : exinfo->initialseekpostype = 1
[LOG] SystemI::DSPCodecPoolRegister            : register codec pool for pool type 5
[LOG] SystemI::createSoundInternal             : Format has 1 subsounds.
[LOG] SystemI::createSoundInternal             : Create as FMOD_CREATESAMPLE
[LOG] SystemI::createSoundInternal             : Multi-sample sound (1 subsounds), create a sample container.
[LOG] SystemI::createSoundInternal             : creating subsound 0/1
[LOG] SystemI::createSample                    : mode 02000202 length 11377 samples, lengthbytes 2912
[LOG] SystemI::createSample                    : channels = 2
[LOG] SystemI::createSample                    : output = 00000000669DA078
[LOG] OutputSoftware::createSample             : lengthpcm 11377, lengthbytes 2912, channels 2, format 2, freq 48000, mode 0200020a
[LOG] SystemI::createSoundInternal             : No name found in file, use filename.
[LOG] SystemI::createSoundInternal             : done.  OpenState now = FMOD_OPENSTATE_READY.

[LOG] SystemI::createSoundInternal             : filename =  : mode 02000202
[LOG] SystemI::createSoundInternal             : exinfo->cbsize             = 232
[LOG] SystemI::createSoundInternal             : exinfo->length             = 43606784
[LOG] SystemI::createSoundInternal             : exinfo->fileoffset         = 3972512
[LOG] SystemI::createSoundInternal             : exinfo->numsubsounds       = 1
[LOG] SystemI::createSoundInternal             : exinfo->inclusionlist      = 00000000733BF5FC
[LOG] SystemI::createSoundInternal             : exinfo->inclusionlistnum   = 1
[LOG] SystemI::createSoundInternal             : exinfo->suggestedsoundtype = 5
[LOG] SystemI::createSoundInternal             : exinfo->useropen           = 00007FFEF1665C70
[LOG] SystemI::createSoundInternal             : exinfo->userclose          = 00007FFEF1665C40
[LOG] SystemI::createSoundInternal             : exinfo->userread           = 00007FFEF1665D40
[LOG] SystemI::createSoundInternal             : exinfo->userseek           = 00007FFEF1665DF0
[LOG] SystemI::createSoundInternal             : exinfo->fileuserdata       = 000000005F558658
[LOG] SystemI::createSoundInternal             : exinfo->initialseekpostype = 1
[LOG] SystemI::DSPCodecPoolRegister            : register codec pool for pool type 5
[LOG] SystemI::createSoundInternal             : Format has 1 subsounds.
[LOG] SystemI::createSoundInternal             : Create as FMOD_CREATESAMPLE
[LOG] SystemI::createSoundInternal             : Multi-sample sound (1 subsounds), create a sample container.
[LOG] SystemI::createSoundInternal             : creating subsound 0/1
[LOG] SystemI::createSample                    : mode 02000202 length 26759 samples, lengthbytes 5952
[LOG] SystemI::createSample                    : channels = 2
[LOG] SystemI::createSample                    : output = 00000000669DA078
[LOG] OutputSoftware::createSample             : lengthpcm 26759, lengthbytes 5952, channels 2, format 2, freq 48000, mode 0200020a
[LOG] SystemI::createSoundInternal             : No name found in file, use filename.
[LOG] SystemI::createSoundInternal             : done.  OpenState now = FMOD_OPENSTATE_READY.

[LOG] SystemI::createSound                     : filename = **************************************************************************/Master Bank.bank : mode 02010082
[LOG] SystemI::createSound                     : FMOD_NONBLOCKING specified.  Putting into queue to be opened asynchronously!
[LOG] SystemI::createSound                     : setdata soundi = 000000004E655368 : node = 0000000011BCEF20
[LOG] SystemI::createSound                     : add node to async list : head = 000000004E3FA058.  list count = 0
[LOG] AsyncThread::threadFunc                  : Starting Asynchronous operation on sound 000000004E655368
[LOG] SystemI::createSoundInternal             :     filename = **************************************************************************/Master Bank.bank : mode 02010082
[LOG] SystemI::createSoundInternal             :     exinfo->cbsize             = 232
[LOG] SystemI::createSoundInternal             :     exinfo->length             = 43606784
[LOG] SystemI::createSoundInternal             :     exinfo->fileoffset         = 3972512
[LOG] SystemI::createSoundInternal             :     exinfo->numsubsounds       = 1
[LOG] SystemI::createSoundInternal             :     exinfo->inclusionlist      = 0000000011BCF038
[LOG] SystemI::createSoundInternal             :     exinfo->inclusionlistnum   = 1
[LOG] SystemI::createSoundInternal             :     exinfo->suggestedsoundtype = 5
[LOG] SystemI::createSoundInternal             :     exinfo->initialseekpostype = 1
[LOG] SystemI::createSoundInternal             :     Format has 1 subsounds.
[LOG] SystemI::createSoundInternal             :     Create as FMOD_CREATESTREAM
[LOG] System::createSoundInternal              :     decode buffersize = 19200 : blocksize = 256 : format = 2
[LOG] SystemI::createSample                    :     mode 02010082 length 19200 samples, lengthbytes 1265696
[LOG] SystemI::createSample                    :     channels = 2
[LOG] SystemI::createSample                    :     output = 00000000669DA078
[LOG] OutputSoftware::createSample             :     lengthpcm 19200, lengthbytes 1265696, channels 2, format 2, freq 48000, mode 0201008a
[LOG] System::createSoundInternal              :     1 subsounds detected.
[LOG] System::createSoundInternal              :     Seek stream to start
[LOG] System::createSoundInternal              :     flush stream buffer
[LOG] System::createSoundInternal              :     flush successful.
[LOG] System::createSoundInternal              :     switch file handle from small blocking single buffered to large nonblocking doublebuffered.
[LOG] SystemI::createSoundInternal             :     done.  OpenState now = FMOD_OPENSTATE_READY.

[LOG] AsyncThread::threadFunc                  : Finished Asynchronous operation on sound 000000004E655368
[LOG] SoundI::getSubSound                      : sound 000000004E655368.  Subsound index 0 / 1
[LOG] SoundI::release                          : BassFaceIntro (000000004E654CA8)
[LOG] SoundI::release                          : remove stream samples. (000000004E654CA8)
[LOG] SoundI::release                          :     BassFaceIntro (000000004E3F96E8)
[LOG] SoundI::release                          :     done
[LOG] SoundI::release                          : release subsounds. (000000004E654CA8)
[LOG] SoundI::release                          :     BassFaceIntro (000000004E654288)
[LOG] SoundI::release                          :     done
[LOG] SoundI::release                          : release codec. (000000004E654CA8)
[LOG] SoundI::release                          : done
[LOG] SoundI::release                          : BassFaceLoop (000000004E655368)
[ERR] ProfileClient::recvThreadLoopFunction    : Recv thread loop returned 16
[LOG] ProfileClient::markForDead               : Closing client connection
[LOG] Thread::callback                         : FMOD profiler thread (recv) finished.
[LOG] Thread::callback                         : FMOD profiler thread (send) finished.

Those are to do with the Studio Live Update connection being closed.
The error may not be ideal as I don’t believe there is anything you can do about that, but I wouldn’t imagine that this would cause a crash.

you have

if (sideBuffer.Length < length * inChannels)
       sideBuffer = new float[length * inChannels];

then

  sideBuffer[(count * outChannels) + count2] 

is it possible inchannels < outchannels therefore you are overwriting your buffer?