Results 1 to 1 of 1

Thread: Exception while using nAudio and uncached sounds

  1. #1
    Junior Member
    Join Date
    Nov 2020
    Posts
    2

    Exception while using nAudio and uncached sounds

    I noticed that I wasn't receiving crew chief audio and found an exception in the console. I had disabled cached audio as it seemed like Crew Chief was leaking memory (found cases of it using 3 to 6 GB of memory in Task Manager sometimes)

    Re-enabling cached audio fixes the exception. Disabling nAudio also fixes this while permitting uncached audio.

    Code:
    07:58:09.174 : Exception processing queued clips: Object reference not set to an instance of an object. stack    at NAudio.Wave.SampleProviders.SampleProviderConverters.ConvertWaveProviderIntoSampleProvider(IWaveProvider waveProvider)
       at NAudio.Wave.SampleProviders.SampleChannel..ctor(IWaveProvider waveProvider, Boolean forceStereo)
       at CrewChiefV4.Audio.SingleSound.createSampleProvider(WaveFileReader reader, Single volume) in C:\projects\crewchief_c_sharp\CrewChiefV4\CrewChiefV4\Audio\Sounds.cs:line 1907
       at CrewChiefV4.Audio.SingleSound.PlayNAudio(Boolean isListenStartBeep) in C:\projects\crewchief_c_sharp\CrewChiefV4\CrewChiefV4\Audio\Sounds.cs:line 1820
       at CrewChiefV4.Audio.SoundCache.Play(List`1 soundNames, SoundMetadata soundMetadata) in C:\projects\crewchief_c_sharp\CrewChiefV4\CrewChiefV4\Audio\Sounds.cs:line 673
       at CrewChiefV4.Audio.AudioPlayer.playSounds(List`1 eventNames, Boolean isImmediateMessages, Boolean& wasInterrupted) in C:\projects\crewchief_c_sharp\CrewChiefV4\CrewChiefV4\Audio\AudioPlayer.cs:line 1574
       at CrewChiefV4.Audio.AudioPlayer.playQueueContents(OrderedDictionary queueToPlay, Boolean isImmediateMessages) in C:\projects\crewchief_c_sharp\CrewChiefV4\CrewChiefV4\Audio\AudioPlayer.cs:line 1399
       at CrewChiefV4.Audio.AudioPlayer.monitorQueue() in C:\projects\crewchief_c_sharp\CrewChiefV4\CrewChiefV4\Audio\AudioPlayer.cs:line 1150
    Last edited by gu3st; 01-01-2022 at 15:03.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •