Hi. I never got anybody feedback for the following message. Can somebody help me? This thread is chronologically increasing(ie. the last part is my actual question). Thank You.
— original thread —
I have to feed a usb plugged-in steering mechanism raw pcm data. Can I do this through FMOD? Any hints on how to do this?
I would probably recommend a user created stream. There is an example for this in ‘usercreatedsound’ example.
Cool. I think I understand through this example how the stream is getting updated.
For the output to our steering-wheel peripheral(as opposed to the main soundcard), do I just call system::setDriver in order to switch to this steering-wheel device?
Also, the data going to the steering-wheel device needs to be updated real-time for our purposes. This seems in contrast with the ‘usercreatedsound’ example as there is a finite-sized buffer that seems to stop updating after a few iterations. Would we want to make a double-buffer for our needs?
Also, in this example is the pcm-filling-callback asynchronous or synchronous.
- mgf1123 asked 10 years ago
This is correct, you can’t switch a major thing like the underlying sound device once the system is running.
If you want to use 2 devices, i recommend maybe creating 2 system objects, then switching your data between 2 custom streams.
I just noticed that setDriver can only be called BEFORE FMOD_System_Init.
Our app calls for us to feed a steering peripheral raw-PCM data every frame. We also obviously need to play sound/music.
If we can’t switch the devices from steering peripheral to primary sound driver then we have a problem.
Is there a way around this or maybe I’m doing something wrong here?
- mgf1123 answered 10 years ago
Please login first to submit.