Category | Scripting |
Created | 21.06.2023 16:10 |
Barry Ryerson (bazthehat) | 21.06.2023 16:10 |
---|---|
Hi, I'm trying to load audio files to replace the footsteps. I've copied and edited the original footsteps template in SoundsTemplates.xml to have my own file with the following: <?xml version="1.0" encoding="utf-8" standalone="no" ?> <soundTemplates> <template name="MUDDY_STEP_FIELD" file="step_mud_1.ogg" innerRadius="2.0" outerRadius="10.0" pitchScale="0.7"> <volume indoor="0.28" outdoor="0.28" /> <pitch indoor="0.9" outdoor="0.9" /> <randomization minVolume="0.1" maxVolume="0.2" minPitch="0.8" maxPitch="1.1" minLowpassGain="0" maxLowpassGain="0" /> <sourceRandomization file="step_mud_2.ogg"/> <sourceRandomization file="step_mud_3.ogg"/> <sourceRandomization file="step_mud_4.ogg"/> <sourceRandomization file="step_mud_5.ogg"/> <sourceRandomization file="step_mud_6.ogg"/> <sourceRandomization file="step_mud_7.ogg"/> <sourceRandomization file="step_mud_8.ogg"/> </template> </soundTemplates> When I go to load the audio using g_soundManager:loadSampleFromXML, I'm getting the following error: ========= Warning: 3D stereo audio files are not supported. Convert 'C:/Users/Admin/OneDrive/Documents/My Games/FarmingSimulator2022/mods/RainPain/audio/step_mud_1.ogg' to mono. ========= Now, I wouldn't mind, but I know for a damn hard fact that the audio file is in mono (I used to be a freelance audio engineer, so if I didn't know that I'd be shot). I've pinned the problem down to createAudioSource, as if I run in the script console: ======= local sample = {} sample.filename = g_modsDirectory .. "RainPain/audio/step_mud_1.ogg" sample.sampleName = "sample" sample.soundNode = createAudioSource(sample.sampleName, sample.filename, 10.0, 2.0, 0.2, 1) ======= then it generates the same error. Like I said, I know damn well it's a mono ogg file at 44.1 KHz, 705 Kbps, exactly the same as the original footstep audio files. Anyone got an idea as to what's going on? |
Barry Ryerson (bazthehat) | 22.06.2023 17:06 |
---|---|
Tried again today and it just worked. Go figure. |
Note: Log in to post. Create a new account here.