I have a very simple Andriod App in MAUI that can play audio files fine using FMODCore but when I attempt to use FMODStudio all the calls return success but no Audio is heard.
Note this is NOT a game.
I’ve check and recheck the Bank files forced failures in some of the API to ensure there were being called but still no joy.
This is my first time trying to use FMOD so I could be missing something basic
Any ideas?
Code (Yes these are abscractions)
FMODManager.Init(new AndroidNativeLibrary(), FMODMode.CoreAndStudio, “content”);
List _banks = new List();
_banks.Add(await StudioSystem.LoadBank(“Master.bank”));
_banks.Add(await StudioSystem.LoadBank(“Master.strings.bank”));
_banks.Add(await StudioSystem.LoadBank(“Vehicles.bank”));
var _engineDescription = StudioSystem.GetEvent("event:/Vehicles/Car Engine");
_engineDescription.LoadSampleData();
_engineInstance = _engineDescription.CreateInstance();
//// If you have any parameters set within FMOD Studio, you can change them within the code.
_engineInstance.SetParameterValue("RPM", 1000);
_engineInstance.SetParameterValue("Load", -1f);
_engineInstance.Volume = 1;
if (_engineInstance.PlaybackState == FMOD.Studio.PLAYBACK_STATE.PLAYING)
{
_engineInstance.Stop();
}
else
{
_engineInstance.Start();
}
LOGS:
[AAudio] AAudioStreamBuilder_openStream() called ----------------------------------------
[AudioStreamBuilder] rate = 0, channels = 0, channelMask = 0, format = 0, sharing = SH, dir = OUTPUT
[AudioStreamBuilder] device = 0, sessionId = -1, perfMode = 12, callback: OFF with frames = 0
[AudioStreamBuilder] usage = 14, contentType = 0, inputPreset = 0, allowedCapturePolicy = 0
[AudioStreamBuilder] privacy sensitive = false, opPackageName = (null), attributionTag = (null)
[libc] Access denied finding property “sys.perf.boostopt”
[nyname.mauihack] PlayerBase::PlayerBase()
[monodroid-assembly] open_from_bundles: failed to load assembly System.Runtime.Intrinsics.dll
[libc] Access denied finding property “sys.perf.boostopt”
[AudioStreamInternal_Client] configureDataInformation() original HW burst = 96, minMicros = 2000 => SW burst = 96
[AAudioStream] setState(s#1) from 0 to 2
[AAudioFlowGraph] configure() source format = 0x00000005, channels = 2, sink format = 0x00000005, channels = 2, useMonoBlend = 0, audioBalance = 0.000000, isExclusive 0
[AAudio] AAudioStreamBuilder_openStream() returns 0 = AAUDIO_OK for s#1 ----------------
[AAudio] AAudioStream_close(s#1) called ---------------
[AudioStreamInternal_Client] release_l(): mServiceStreamHandle = 0x0000017E
[AAudioStream] setState(s#1) from 2 to 11
Loaded assembly: /data/data/com.companyname.mauihack/files/.override/System.Runtime.Intrinsics.dll [External]
[AAudioStream] setState(s#1) from 11 to 11
[AAudioStream] setState(s#1) from 11 to 12
[AudioStreamInternal_Client] ~AudioStreamInternal() 0xb40000769420f5c0 called
[AAudioStream] ~AudioStream(s#1) mPlayerBase strongCount = 2
[AAudio] AAudioStream_close(s#1) returned 0 ---------
[fmod] FMOD::supportsLowLatency : Low latency = false, Pro Audio = false, Bluetooth On = false, Acceptable Block Size = false (0)
[AAudio] AAudioStreamBuilder_openStream() called ----------------------------------------
[AudioStreamBuilder] rate = 0, channels = 0, channelMask = 0, format = 0, sharing = SH, dir = OUTPUT
[AudioStreamBuilder] device = 0, sessionId = -1, perfMode = 12, callback: ON with frames = 0
[AudioStreamBuilder] usage = 14, contentType = 0, inputPreset = 0, allowedCapturePolicy = 0
[AudioStreamBuilder] privacy sensitive = false, opPackageName = (null), attributionTag = (null)
[nyname.mauihack] PlayerBase::PlayerBase()
[nyname.mauihack] Explicit concurrent copying GC freed 16735(1842KB) AllocSpace objects, 0(0B) LOS objects, 59% free, 4245KB/10MB, paused 25us,14us total 9.020ms
[AudioStreamInternal_Client] configureDataInformation() original HW burst = 96, minMicros = 2000 => SW burst = 96
[AAudioStream] setState(s#2) from 0 to 2
[AAudioFlowGraph] configure() source format = 0x00000005, channels = 2, sink format = 0x00000005, channels = 2, useMonoBlend = 0, audioBalance = 0.000000, isExclusive 0
[AAudio] AAudioStreamBuilder_openStream() returns 0 = AAUDIO_OK for s#2 ----------------
[AAudio] AAudioStream_close(s#2) called ---------------
[AudioStreamInternal_Client] release_l(): mServiceStreamHandle = 0x00000180
[AAudioStream] setState(s#2) from 2 to 11
[AAudioStream] setState(s#2) from 11 to 11
[AAudioStream] setState(s#2) from 11 to 12
[AudioStreamInternal_Client] ~AudioStreamInternal() 0xb40000769420f5c0 called
[AAudioStream] ~AudioStream(s#2) mPlayerBase strongCount = 2
[AAudio] AAudioStream_close(s#2) returned 0 ---------
[AAudio] AAudioStreamBuilder_openStream() called ----------------------------------------
[AudioStreamBuilder] rate = 0, channels = 0, channelMask = 0, format = 0, sharing = SH, dir = OUTPUT
[AudioStreamBuilder] device = 0, sessionId = -1, perfMode = 12, callback: ON with frames = 0
[AudioStreamBuilder] usage = 14, contentType = 0, inputPreset = 0, allowedCapturePolicy = 0
[AudioStreamBuilder] privacy sensitive = false, opPackageName = (null), attributionTag = (null)
[nyname.mauihack] PlayerBase::PlayerBase()
[AudioStreamInternal_Client] configureDataInformation() original HW burst = 96, minMicros = 2000 => SW burst = 96
[AAudioStream] setState(s#3) from 0 to 2
[AAudioFlowGraph] configure() source format = 0x00000005, channels = 2, sink format = 0x00000005, channels = 2, useMonoBlend = 0, audioBalance = 0.000000, isExclusive 0
[AAudio] AAudioStreamBuilder_openStream() returns 0 = AAUDIO_OK for s#3 ----------------
[AAudio] AAudioStream_requestStart(s#3) called --------------
[AAudioStream] setState(s#3) from 2 to 3
[AAudio] AAudioStream_requestStart(s#3) returned 0 ---------
[AudioStreamInternalPlay_Client] callbackLoop() entering >>>>>>>>>>>>>>>
[AudioStreamInternal_Client] onEventFromServer - got AAUDIO_SERVICE_EVENT_STARTED
[AAudioStream] setState(s#3) from 3 to 4
[Choreographer] Skipped 237 frames! The application may be doing too much work on its main thread.
[OpenGLRenderer] Davey! duration=3975ms; Flags=0, FrameTimelineVsyncId=132854536, IntendedVsync=496268666292998, Vsync=496272616292840, InputEventId=971261266, HandleInputStart=496272629977923, AnimationStart=496272630367454, PerformTraversalsStart=496272630987402, DrawStart=496272631482610, FrameDeadline=496268682959664, FrameInterval=496272629589017, FrameStartTime=16602554, SyncQueued=496272632908600, SyncStart=496272633036256, IssueDrawCommandsStart=496272633196725, SwapBuffers=496272634736985, FrameCompleted=496272641710944, DequeueBufferDuration=41041, QueueBufferDuration=533437, GpuCompleted=496272641710944, SwapBuffersCompleted=496272635915267, DisplayPresentTime=8589934596, CommandSubmissionCompleted=496272634736985,
[monodroid-assembly] open_from_bundles: failed to load assembly System.Xml.XmlSerializer.dll